summaryrefslogtreecommitdiff
path: root/Juick/Model/Chat.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Model/Chat.m')
-rw-r--r--Juick/Model/Chat.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/Juick/Model/Chat.m b/Juick/Model/Chat.m
index ff5fb83..66ed394 100644
--- a/Juick/Model/Chat.m
+++ b/Juick/Model/Chat.m
@@ -10,4 +10,15 @@
@implementation Chat
++(Chat *) fromJSON:(NSDictionary *)jsonData {
+ Chat *user = [Chat new];
+ user.uid = jsonData[@"uid"];
+ user.uname = jsonData[@"uname"];
+ user.avatar = jsonData[@"avatar"];
+ user.unreadCount = jsonData[@"unreadCount"];
+ user.lastMessageTimestamp = jsonData[@"lastMessageTimestamp"];
+ user.lastMessageText = jsonData[@"lastMessageText"];
+ return user;
+}
+
@end