summaryrefslogtreecommitdiff
path: root/Juick/Model
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-12-30 08:57:15 +0300
committerGravatar Vitaly Takmazov2020-12-30 08:57:15 +0300
commit650fd803616d0e782d02b965c49fa06be65cea79 (patch)
treeb6c6400cd72d86de438415e79a9ed41ae6af7e79 /Juick/Model
parent3d0d75fd56fe5823468318129de4da55e4b27b25 (diff)
Fetch external users
Diffstat (limited to 'Juick/Model')
-rw-r--r--Juick/Model/User.h1
-rw-r--r--Juick/Model/User.m1
2 files changed, 2 insertions, 0 deletions
diff --git a/Juick/Model/User.h b/Juick/Model/User.h
index 4bbf332..cb63ebc 100644
--- a/Juick/Model/User.h
+++ b/Juick/Model/User.h
@@ -13,6 +13,7 @@
@property (nonatomic, strong) NSString *uid;
@property (nonatomic, strong) NSString *avatar;
@property (nonatomic, strong) NSString *token;
+@property (nonatomic, strong) NSString *uri;
@property (nonatomic) NSInteger unreadCount;
+ (User *) fromJSON:(NSDictionary *)jsonData;
diff --git a/Juick/Model/User.m b/Juick/Model/User.m
index f9b2990..ee3cce8 100644
--- a/Juick/Model/User.m
+++ b/Juick/Model/User.m
@@ -16,6 +16,7 @@
user.uname = jsonData[@"uname"];
user.avatar = jsonData[@"avatar"];
user.token = jsonData[@"hash"];
+ user.uri = jsonData[@"uri"];
user.unreadCount = [jsonData[@"messagesCount"] integerValue];
return user;
}