Get objectType and objectId for rooms.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Ivan Sein 2018-12-11 11:21:50 +01:00
Родитель 6fce7188bb
Коммит f229e5fb05
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -44,6 +44,8 @@ typedef enum NCRoomNotificationLevel {
@property (nonatomic, strong) NCChatMessage *lastMessage;
@property (nonatomic, assign) BOOL isFavorite;
@property (nonatomic, assign) NCRoomNotificationLevel notificationLevel;
@property (nonatomic, copy) NSString *objectType;
@property (nonatomic, copy) NSString *objectId;
+ (instancetype)roomWithDictionary:(NSDictionary *)roomDict;

Просмотреть файл

@ -35,6 +35,8 @@
room.lastMessage = [NCChatMessage messageWithDictionary:[roomDict objectForKey:@"lastMessage"]];
room.isFavorite = [[roomDict objectForKey:@"isFavorite"] boolValue];
room.notificationLevel = (NCRoomNotificationLevel)[[roomDict objectForKey:@"notificationLevel"] integerValue];
room.objectType = [roomDict objectForKey:@"objectType"];
room.objectId = [roomDict objectForKey:@"objectId"];
id name = [roomDict objectForKey:@"name"];
if ([name isKindOfClass:[NSString class]]) {