Fix closed group creation

This commit is contained in:
nielsandriesse 2020-05-22 11:57:40 +10:00
parent b647fff5b8
commit 9b329cbd34

View File

@ -36,8 +36,9 @@ object ClosedGroupsProtocol {
@JvmStatic
fun shouldIgnoreGroupCreatedMessage(context: Context, group: SignalServiceGroup): Boolean {
val members = group.members
val userMasterDevice = TextSecurePreferences.getMasterHexEncodedPublicKey(context)
return !members.isPresent || !members.get().contains(userMasterDevice)
val masterPublicKeyOrNull = TextSecurePreferences.getMasterHexEncodedPublicKey(context)
val masterPublicKey = masterPublicKeyOrNull ?: TextSecurePreferences.getLocalNumber(context)
return !members.isPresent || !members.get().contains(masterPublicKey)
}
@JvmStatic