diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt index eca5c846ca..d0247553aa 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerViewModel.kt @@ -472,14 +472,16 @@ class MessageComposerViewModel @AssistedInject constructor( Unit } is ParsedCommand.UpgradeRoom -> { - _viewEvents.post( - MessageComposerViewEvents.ShowRoomUpgradeDialog( - parsedCommand.newVersion, - room.roomSummary()?.isPublic ?: false - ) - ) - _viewEvents.post(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand)) - popDraft() + viewModelScope.launch { + _viewEvents.set( + MessageComposerViewEvents.ShowRoomUpgradeDialog( + parsedCommand.newVersion, + room.roomSummary()?.isPublic ?: false + ) + ) + _viewEvents.set(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand)) + popDraft() + } } } }