Incorrect use of channel (#902)

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

@ -386,11 +386,11 @@ object ConversationMenuHelper {
"Invalid group public key" "Invalid group public key"
} }
try { try {
channel.send(GroupLeavingStatus.Leaving) channel.trySend(GroupLeavingStatus.Leaving)
MessageSender.leave(groupPublicKey) MessageSender.leave(groupPublicKey)
channel.send(GroupLeavingStatus.Left) channel.trySend(GroupLeavingStatus.Left)
} catch (e: Exception) { } catch (e: Exception) {
channel.send(GroupLeavingStatus.Error) channel.trySend(GroupLeavingStatus.Error)
throw e throw e
} }
} }
@ -413,11 +413,11 @@ object ConversationMenuHelper {
storage = storage, storage = storage,
doLeave = { doLeave = {
try { try {
channel.send(GroupLeavingStatus.Leaving) channel.trySend(GroupLeavingStatus.Leaving)
groupManager.leaveGroup(accountId) groupManager.leaveGroup(accountId)
channel.send(GroupLeavingStatus.Left) channel.trySend(GroupLeavingStatus.Left)
} catch (e: Exception) { } catch (e: Exception) {
channel.send(GroupLeavingStatus.Error) channel.trySend(GroupLeavingStatus.Error)
throw e throw e
} }
} }

Loading…
Cancel
Save