diff --git a/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt b/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt index fe9f810a4c..3bbef55842 100644 --- a/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt +++ b/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt @@ -22,11 +22,15 @@ import java.util.* object ClosedGroupsProtocol { + /** + * Blocks the calling thread. + */ @JvmStatic fun shouldIgnoreContentMessage(context: Context, conversation: Recipient, groupID: String?, content: SignalServiceContent): Boolean { if (!conversation.address.isClosedGroup || groupID == null) { return false } // A closed group's members should never include slave devices val senderPublicKey = content.sender + LokiFileServerAPI.shared.getDeviceLinks(senderPublicKey).get() val senderMasterPublicKey = MultiDeviceProtocol.shared.getMasterDevice(senderPublicKey) val publicKeyToCheckFor = senderMasterPublicKey ?: senderPublicKey val members = DatabaseFactory.getGroupDatabase(context).getGroupMembers(groupID, true)