зеркало из https://github.com/nextcloud/talk-ios.git
Cast user's id and name when retrieving contacts.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
b1d3a70317
Коммит
e3acf2118a
|
@ -17,8 +17,20 @@
|
|||
}
|
||||
|
||||
NCUser *user = [[NCUser alloc] init];
|
||||
user.userId = [[userDict objectForKey:@"value"] objectForKey:@"shareWith"];
|
||||
user.name = [userDict objectForKey:@"label"];
|
||||
|
||||
id userId = [[userDict objectForKey:@"value"] objectForKey:@"shareWith"];
|
||||
if ([userId isKindOfClass:[NSString class]]) {
|
||||
user.userId = userId;
|
||||
} else {
|
||||
user.userId = [userId stringValue];
|
||||
}
|
||||
|
||||
id name = [userDict objectForKey:@"label"];
|
||||
if ([name isKindOfClass:[NSString class]]) {
|
||||
user.name = name;
|
||||
} else {
|
||||
user.name = [name stringValue];
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче