diff --git a/Signal/src/Loki/View Controllers/JoinPublicChatVC.swift b/Signal/src/Loki/View Controllers/JoinPublicChatVC.swift index fc72108fe..adbdf957c 100644 --- a/Signal/src/Loki/View Controllers/JoinPublicChatVC.swift +++ b/Signal/src/Loki/View Controllers/JoinPublicChatVC.swift @@ -144,7 +144,6 @@ final class JoinPublicChatVC : BaseVC, UIPageViewControllerDataSource, UIPageVie } LokiPublicChatManager.shared.addChat(server: urlAsString, channel: channelID) .done(on: .main) { [weak self] _ in - let _ = LokiPublicChatAPI.getMessages(for: channelID, on: urlAsString) let _ = LokiPublicChatAPI.setDisplayName(to: displayName, on: urlAsString) let _ = LokiPublicChatAPI.setProfilePictureURL(to: profilePictureURL, using: profileKey, on: urlAsString) let _ = LokiPublicChatAPI.join(channelID, on: urlAsString) diff --git a/SignalServiceKit/src/Messages/OWSMessageManager.m b/SignalServiceKit/src/Messages/OWSMessageManager.m index 672493568..83d60f2d7 100644 --- a/SignalServiceKit/src/Messages/OWSMessageManager.m +++ b/SignalServiceKit/src/Messages/OWSMessageManager.m @@ -603,7 +603,9 @@ NS_ASSUME_NONNULL_BEGIN if (groupThread) { // Loki: Ignore closed group message if needed - if ([LKClosedGroupsProtocol shouldIgnoreClosedGroupMessage:dataMessage inThread:groupThread wrappedIn:envelope]) { return; } + if (groupThread.groupModel.groupType == closedGroup) { + if ([LKClosedGroupsProtocol shouldIgnoreClosedGroupMessage:dataMessage inThread:groupThread wrappedIn:envelope]) { return; } + } if (dataMessage.group.type != SSKProtoGroupContextTypeUpdate) { if (![groupThread isCurrentUserInGroupWithTransaction:transaction]) { @@ -1370,7 +1372,8 @@ NS_ASSUME_NONNULL_BEGIN switch (dataMessage.group.type) { case SSKProtoGroupContextTypeUpdate: { // Loki: Ignore updates from non-admins (deprecated) - if (oldGroupThread != nil && [LKClosedGroupsProtocol shouldIgnoreClosedGroupUpdateMessage:dataMessage inThread:oldGroupThread wrappedIn:envelope]) { + if (oldGroupThread != nil && oldGroupThread.groupModel.groupType == closedGroup + && [LKClosedGroupsProtocol shouldIgnoreClosedGroupUpdateMessage:dataMessage inThread:oldGroupThread wrappedIn:envelope]) { return nil; } // Ensures that the thread exists but don't update it.