From 5372173c4a0d4d2c50756bbe5986ad95a7bb1f88 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 20 Sep 2016 19:16:05 -0400 Subject: [PATCH] Fix groups breaking without avatar (#1336) - Group updates were appearing as "unsupported attachment" - Couldn't message in a new group unless it had attachment. // FREEBIE --- Podfile.lock | 2 +- Signal/Signal-Info.plist | 2 +- .../src/view controllers/MessagesViewController.m | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 07df9be51..c4608db60 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -130,7 +130,7 @@ EXTERNAL SOURCES: CHECKOUT OPTIONS: SignalServiceKit: - :commit: a0df56a68e5db7729a209b069bcdfd56e6d7e92a + :commit: 1824af5335d8faa9f30eed40f0e1dc8198650ceb :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 8096fef47d582bff8ae3758c9ae7af1d55ea53d6 diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 6c431a8b1..6e3258591 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -38,7 +38,7 @@ CFBundleVersion - 2.5.0.16 + 2.5.0.17 ITSAppUsesNonExemptEncryption LOGS_EMAIL diff --git a/Signal/src/view controllers/MessagesViewController.m b/Signal/src/view controllers/MessagesViewController.m index 4fbbb97e3..08683fc2f 100644 --- a/Signal/src/view controllers/MessagesViewController.m +++ b/Signal/src/view controllers/MessagesViewController.m @@ -158,12 +158,13 @@ typedef enum : NSUInteger { return; } - if ([_thread isKindOfClass:[TSGroupThread class]] && - ![((TSGroupThread *)_thread).groupModel.groupMemberIds containsObject:[TSAccountManager localNumber]]) { - - [self inputToolbar].hidden = YES; // user has requested they leave the group. further sends disallowed - [self.inputToolbar endEditing:TRUE]; - self.navigationItem.rightBarButtonItem = nil; // further group action disallowed + if ([_thread isKindOfClass:[TSGroupThread class]]) { + TSGroupThread *groupThread = (TSGroupThread *)self.thread; + if (![groupThread.groupModel.groupMemberIds containsObject:[TSAccountManager localNumber]]) { + [self inputToolbar].hidden = YES; // user has requested they leave the group. further sends disallowed + [self.inputToolbar endEditing:TRUE]; + self.navigationItem.rightBarButtonItem = nil; // further group action disallowed + } } else { [self inputToolbar].hidden = NO; [self loadDraftInCompose];