Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous fixes to the user streams branch #84

Open
wants to merge 2 commits into
base: user-streams
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ADNKit/ANKChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@property (assign) BOOL isEditableByCurrentUser;
@property (assign) BOOL isInactive;
@property (assign) BOOL hasUnreadMessages;
@property (assign) BOOL youMuted;

- (BOOL)isPrivateMessageChannel;

Expand Down
3 changes: 2 additions & 1 deletion ADNKit/ANKChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ + (NSDictionary *)JSONToLocalKeyMapping {
@"has_unread": @"hasUnreadMessages",
@"recent_message_id": @"latestMessageID",
@"recent_message": @"latestMessage",
@"is_inactive" : @"isInactive"}];
@"is_inactive" : @"isInactive",
@"you_muted" : @"youMuted"}];
}


Expand Down
2 changes: 1 addition & 1 deletion ADNKit/ANKClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ - (id)parsedObjectFromJSON:(NSDictionary *)JSON {
BOOL isMessage = sampleObject[@"channel_id"] && !sampleObject[@"canonical_url"] && !sampleObject[@"num_stars"];
BOOL isPost = sampleObject[@"num_stars"] && sampleObject[@"user"] && sampleObject[@"canonical_url"] && sampleObject[@"text"];
BOOL isChannel = sampleObject[@"has_unread"] && sampleObject[@"readers"];
BOOL isFile = sampleObject[@"complete"] && sampleObject[@"derived_files"];
BOOL isFile = sampleObject[@"complete"] && sampleObject[@"file_token"];

ANKAPIResponse *response = [[ANKAPIResponse alloc] initWithResponseObject:JSON];
Class resourceClass = nil;
Expand Down