mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Don't notify for closed group control messages
This addresses an issue where: • someone would create a closed group • on other peoples' devices this control message would be received through a background poll or a push notification • the received message timestamps table would be updated • processing wouldn't be finished (during a background poll or while handling a push notification the system can cut you off at any time) • some of the added users don't see the new closed group because when they open the app and get the control message from their swarm it's considered a duplicate and isn't processed again
This commit is contained in:
parent
01b86fcc2f
commit
66e7df22bb
@ -163,9 +163,11 @@ object MessageSender {
|
||||
}
|
||||
handleSuccessfulMessageSend(message, destination, isSyncMessage)
|
||||
var shouldNotify = (message is VisibleMessage && !isSyncMessage)
|
||||
/*
|
||||
if (message is ClosedGroupControlMessage && message.kind is ClosedGroupControlMessage.Kind.New) {
|
||||
shouldNotify = true
|
||||
}
|
||||
*/
|
||||
if (shouldNotify) {
|
||||
val notifyPNServerJob = NotifyPNServerJob(snodeMessage)
|
||||
JobQueue.shared.add(notifyPNServerJob)
|
||||
|
@ -28,7 +28,7 @@ class ClosedGroupPollerV2 {
|
||||
|
||||
companion object {
|
||||
private val minPollInterval = 4 * 1000
|
||||
private val maxPollInterval = 2 * 60 * 1000
|
||||
private val maxPollInterval = 4 * 60 * 1000
|
||||
|
||||
@JvmStatic
|
||||
val shared = ClosedGroupPollerV2()
|
||||
|
Loading…
Reference in New Issue
Block a user