mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 13:48:26 +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)
|
handleSuccessfulMessageSend(message, destination, isSyncMessage)
|
||||||
var shouldNotify = (message is VisibleMessage && !isSyncMessage)
|
var shouldNotify = (message is VisibleMessage && !isSyncMessage)
|
||||||
|
/*
|
||||||
if (message is ClosedGroupControlMessage && message.kind is ClosedGroupControlMessage.Kind.New) {
|
if (message is ClosedGroupControlMessage && message.kind is ClosedGroupControlMessage.Kind.New) {
|
||||||
shouldNotify = true
|
shouldNotify = true
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (shouldNotify) {
|
if (shouldNotify) {
|
||||||
val notifyPNServerJob = NotifyPNServerJob(snodeMessage)
|
val notifyPNServerJob = NotifyPNServerJob(snodeMessage)
|
||||||
JobQueue.shared.add(notifyPNServerJob)
|
JobQueue.shared.add(notifyPNServerJob)
|
||||||
|
@ -28,7 +28,7 @@ class ClosedGroupPollerV2 {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val minPollInterval = 4 * 1000
|
private val minPollInterval = 4 * 1000
|
||||||
private val maxPollInterval = 2 * 60 * 1000
|
private val maxPollInterval = 4 * 60 * 1000
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val shared = ClosedGroupPollerV2()
|
val shared = ClosedGroupPollerV2()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user