diff --git a/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme b/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme
index 76ee62c7b..65f0efbe7 100644
--- a/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme
+++ b/Signal.xcodeproj/xcshareddata/xcschemes/Signal.xcscheme
@@ -134,7 +134,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- enableThreadSanitizer = "YES"
enableUBSanitizer = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist
index fa5981210..e9666fa16 100644
--- a/Signal/Signal-Info.plist
+++ b/Signal/Signal-Info.plist
@@ -7,7 +7,7 @@
CarthageVersion
0.34.0
OSXVersion
- 10.15.1
+ 10.15.2
WebRTCCommit
1445d719bf05280270e9f77576f80f973fd847f8 M73
diff --git a/Signal/src/ViewControllers/NewGroupViewController.m b/Signal/src/ViewControllers/NewGroupViewController.m
index 4ef622c86..410c3e534 100644
--- a/Signal/src/ViewControllers/NewGroupViewController.m
+++ b/Signal/src/ViewControllers/NewGroupViewController.m
@@ -89,6 +89,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)commonInit
{
_groupId = [Randomness generateRandomBytes:kGroupIdLength];
+ _groupType = SIGNAL;
_messageSender = SSKEnvironment.shared.messageSender;
_contactsViewHelper = [[ContactsViewHelper alloc] initWithDelegate:self];
diff --git a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m
index af918a4c3..24ce84b6f 100644
--- a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m
+++ b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m
@@ -185,6 +185,17 @@ const CGFloat kIconViewLength = 24;
return [self.thread isKindOfClass:[TSGroupThread class]];
}
+-(BOOL)isPrivateGroupChat
+{
+ if (self.isGroupThread) {
+ TSGroupThread *thread = (TSGroupThread*)self.thread;
+ if (thread.isRSSFeed || thread.isPublicChat) {
+ return false;
+ }
+ }
+ return true;
+}
+
- (void)configureWithThread:(TSThread *)thread uiDatabaseConnection:(YapDatabaseConnection *)uiDatabaseConnection
{
OWSAssertDebug(thread);
@@ -624,8 +635,8 @@ const CGFloat kIconViewLength = 24;
// Group settings section.
- /*
- if (self.isGroupThread) {
+
+ if (self.isGroupThread && self.isPrivateGroupChat) {
NSArray *groupItems = @[
[OWSTableItem
itemWithCustomCellBlock:^{
@@ -676,7 +687,7 @@ const CGFloat kIconViewLength = 24;
@"Conversation settings table section title")
items:groupItems]];
}
- */
+
// Mute thread section.
@@ -1075,8 +1086,10 @@ const CGFloat kIconViewLength = 24;
- (void)showGroupMembersView
{
+ OWSLogInfo(@"Setting show thread");
+ TSGroupThread *groupThread = (TSGroupThread *)self.thread;
ShowGroupMembersViewController *showGroupMembersViewController = [ShowGroupMembersViewController new];
- [showGroupMembersViewController configWithThread:(TSGroupThread *)self.thread];
+ [showGroupMembersViewController configWithThread:groupThread];
[self.navigationController pushViewController:showGroupMembersViewController animated:YES];
}
diff --git a/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m b/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m
index beca2be95..0a5dad949 100644
--- a/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m
+++ b/Signal/src/ViewControllers/ThreadSettings/ShowGroupMembersViewController.m
@@ -92,6 +92,8 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssertDebug(self.thread.groupModel.groupMemberIds);
self.memberRecipientIds = [NSSet setWithArray:self.thread.groupModel.groupMemberIds];
+
+ OWSLogInfo(@"Setting show thread %@", self.thread.groupModel.groupName);
}
- (void)viewDidLoad
@@ -112,6 +114,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)updateTableContents
{
+// OWSLogInfo(@"Setting show thread %@", self.thread.groupModel.groupName);
OWSAssertDebug(self.thread);
OWSTableContents *contents = [OWSTableContents new];
diff --git a/SignalServiceKit/src/Contacts/TSThread.h b/SignalServiceKit/src/Contacts/TSThread.h
index 11f80b45e..f8a24220e 100644
--- a/SignalServiceKit/src/Contacts/TSThread.h
+++ b/SignalServiceKit/src/Contacts/TSThread.h
@@ -72,6 +72,8 @@ typedef NS_ENUM(NSInteger, LKThreadFriendRequestStatus) {
* @return YES if is a group thread, NO otherwise.
*/
- (BOOL)isGroupThread;
+//- (BOOL)isPublicChat;
+//- (BOOL)isRSSFeed;
/**
* Returns the name of the thread.
diff --git a/SignalServiceKit/src/Contacts/TSThread.m b/SignalServiceKit/src/Contacts/TSThread.m
index 47609049a..ed1013980 100644
--- a/SignalServiceKit/src/Contacts/TSThread.m
+++ b/SignalServiceKit/src/Contacts/TSThread.m
@@ -94,6 +94,12 @@ ConversationColorName const kConversationColorName_Default = ConversationColorNa
}
_friendRequestStatus = LKThreadFriendRequestStatusNone;
+
+ // Loki - Friend request logic doesn't apply to group chats, always treat them as friends
+ if (self.isGroupThread) {
+ _friendRequestStatus = LKThreadFriendRequestStatusFriends;
+ }
+// OWSLogInfo(@"FRIEND REQUEST STATUS %@", self.friendRequestStatusDescription);
}
return self;
@@ -225,6 +231,20 @@ ConversationColorName const kConversationColorName_Default = ConversationColorNa
return NO;
}
+//- (BOOL)isPublicChat
+//{
+// OWSAbstractMethod();
+//
+// return NO;
+//}
+//
+//- (BOOL)isRSSFeed
+//{
+// OWSAbstractMethod();
+//
+// return NO;
+//}
+
// Override in ContactThread
- (nullable NSString *)contactIdentifier
{
diff --git a/SignalServiceKit/src/Contacts/Threads/TSGroupThread.h b/SignalServiceKit/src/Contacts/Threads/TSGroupThread.h
index 50d685d68..63fcab313 100644
--- a/SignalServiceKit/src/Contacts/Threads/TSGroupThread.h
+++ b/SignalServiceKit/src/Contacts/Threads/TSGroupThread.h
@@ -17,6 +17,7 @@ extern NSString *const TSGroupThread_NotificationKey_UniqueId;
@property (nonatomic, strong) TSGroupModel *groupModel;
@property (nonatomic, readonly) BOOL isRSSFeed;
+@property (nonatomic, readonly) BOOL isPublicChat;
+ (instancetype)getOrCreateThreadWithGroupModel:(TSGroupModel *)groupModel;
+ (instancetype)getOrCreateThreadWithGroupModel:(TSGroupModel *)groupModel