From f229e5fb05c374454e02afc0ee2605234d2f402b Mon Sep 17 00:00:00 2001 From: Ivan Sein Date: Tue, 11 Dec 2018 11:21:50 +0100 Subject: [PATCH] Get objectType and objectId for rooms. Signed-off-by: Ivan Sein --- VideoCalls/NCRoom.h | 2 ++ VideoCalls/NCRoom.m | 2 ++ 2 files changed, 4 insertions(+) diff --git a/VideoCalls/NCRoom.h b/VideoCalls/NCRoom.h index 4f51873e..cb8d3ff9 100644 --- a/VideoCalls/NCRoom.h +++ b/VideoCalls/NCRoom.h @@ -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; diff --git a/VideoCalls/NCRoom.m b/VideoCalls/NCRoom.m index 3fb9d5cf..f74d88d1 100644 --- a/VideoCalls/NCRoom.m +++ b/VideoCalls/NCRoom.m @@ -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]]) {