[SES-3395] - Fix group notification issue (#973)

pull/1710/head
SessionHero01 3 months ago committed by GitHub
parent a1fd6cc1d8
commit 45e1f6720d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -276,11 +276,6 @@ class GroupManagerV2Impl @Inject constructor(
subAccountTokens = subAccountTokens subAccountTokens = subAccountTokens
) )
// Send a group update message to the group telling members someone has been invited
if (!isReinvite) {
sendGroupUpdateForAddingMembers(group, adminKey, newMembers)
}
// Call the API // Call the API
try { try {
val swarmNode = SnodeAPI.getSingleTargetSnode(group.hexString).await() val swarmNode = SnodeAPI.getSingleTargetSnode(group.hexString).await()
@ -310,6 +305,11 @@ class GroupManagerV2Impl @Inject constructor(
groupName = groupName, groupName = groupName,
underlying = e underlying = e
) )
} finally {
// Send a group update message to the group telling members someone has been invited
if (!isReinvite) {
sendGroupUpdateForAddingMembers(group, adminKey, newMembers)
}
} }
// Send the invitation message to the new members // Send the invitation message to the new members
@ -346,9 +346,9 @@ class GroupManagerV2Impl @Inject constructor(
.build() .build()
).apply { this.sentTimestamp = timestamp } ).apply { this.sentTimestamp = timestamp }
MessageSender.send(updatedMessage, Address.fromSerialized(group.hexString))
storage.insertGroupInfoChange(updatedMessage, group) storage.insertGroupInfoChange(updatedMessage, group)
MessageSender.send(updatedMessage, Address.fromSerialized(group.hexString))
} }
override suspend fun removeMembers( override suspend fun removeMembers(

@ -94,7 +94,7 @@ data class PushNotificationMetadata(
/** The swarm namespace in which this message arrived. */ /** The swarm namespace in which this message arrived. */
@SerialName("n") @SerialName("n")
val namespace: Int, val namespace: Int?,
@SerialName("t") @SerialName("t")
val timestampSeconds: Long, val timestampSeconds: Long,

Loading…
Cancel
Save