Fix poller unable to start when approving group invite (#888)

pull/1709/head
SessionHero01 3 months ago committed by GitHub
parent 681ac32198
commit 54f381e2a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -638,6 +638,14 @@ class GroupManagerV2Impl @Inject constructor(
"Our account ID is not available"
}
// Clear the invited flag of the group in the config
configFactory.withMutableUserConfigs { configs ->
configs.userGroups.set(group.copy(
invited = false,
joinedAtSecs = TimeUnit.MILLISECONDS.toSeconds(clock.currentTimeMills())
))
}
val poller = checkNotNull(pollerFactory.pollerFor(group.groupAccountId)) { "Unable to start a poller for groups " }
poller.start()
@ -649,13 +657,6 @@ class GroupManagerV2Impl @Inject constructor(
.filter { it.hadAtLeastOneSuccessfulPoll }
.first()
}
// Clear the invited flag of the group in the config
configFactory.withMutableUserConfigs { configs ->
configs.userGroups.set(group.copy(
invited = false,
joinedAtSecs = TimeUnit.MILLISECONDS.toSeconds(clock.currentTimeMills())
))
}
if (group.adminKey == null) {
// Send an invite response to the group if we are invited as a regular member

Loading…
Cancel
Save