summaryrefslogtreecommitdiff
path: root/Juick/Model/Chat.m
blob: 66ed394e9ea8dcb4ed78b14d0557de231cc42235 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//
//  Chat.m
//  Juick
//
//  Created by Vitaly Takmazov on 04/03/2018.
//  Copyright © 2018 com.juick. All rights reserved.
//

#import "Chat.h"

@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