mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 19:07:40 +00:00
fix: standardise call menu recipient function to share with the new action bar to center better. issue with closed group creation on multi device potentially
This commit is contained in:
@@ -173,7 +173,7 @@ private fun handleConfigurationMessage(message: ConfigurationMessage) {
|
||||
if (allClosedGroupPublicKeys.contains(closedGroup.publicKey)) {
|
||||
// just handle the closed group encryption key pairs to avoid sync'd devices getting out of sync
|
||||
storage.addClosedGroupEncryptionKeyPair(closedGroup.encryptionKeyPair!!, closedGroup.publicKey)
|
||||
} else if (firstTimeSync) {
|
||||
} else {
|
||||
// only handle new closed group if it's first time sync
|
||||
handleNewClosedGroup(message.sender!!, message.sentTimestamp!!, closedGroup.publicKey, closedGroup.name,
|
||||
closedGroup.encryptionKeyPair!!, closedGroup.members, closedGroup.admins, message.sentTimestamp!!, closedGroup.expirationTimer)
|
||||
@@ -502,7 +502,7 @@ private fun MessageReceiver.handleClosedGroupControlMessage(message: ClosedGroup
|
||||
private fun MessageReceiver.handleNewClosedGroup(message: ClosedGroupControlMessage) {
|
||||
val kind = message.kind!! as? ClosedGroupControlMessage.Kind.New ?: return
|
||||
val recipient = Recipient.from(MessagingModuleConfiguration.shared.context, Address.fromSerialized(message.sender!!), false)
|
||||
if (!recipient.isApproved) return
|
||||
if (!recipient.isApproved && !recipient.isLocalNumber) return
|
||||
val groupPublicKey = kind.publicKey.toByteArray().toHexString()
|
||||
val members = kind.members.map { it.toByteArray().toHexString() }
|
||||
val admins = kind.admins.map { it.toByteArray().toHexString() }
|
||||
|
@@ -750,6 +750,10 @@ public class Recipient implements RecipientModifiedListener {
|
||||
return this;
|
||||
}
|
||||
|
||||
public synchronized boolean showCallMenu() {
|
||||
return !isGroupRecipient() && hasApprovedMe();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
Reference in New Issue
Block a user