Fixes UpgradeRoom command not working

This commit is contained in:
ericdecanini 2022-05-23 14:09:29 +02:00
parent b9b0e84704
commit f831252e35

View File

@ -472,14 +472,16 @@ class MessageComposerViewModel @AssistedInject constructor(
Unit Unit
} }
is ParsedCommand.UpgradeRoom -> { is ParsedCommand.UpgradeRoom -> {
_viewEvents.post( viewModelScope.launch {
MessageComposerViewEvents.ShowRoomUpgradeDialog( _viewEvents.set(
parsedCommand.newVersion, MessageComposerViewEvents.ShowRoomUpgradeDialog(
room.roomSummary()?.isPublic ?: false parsedCommand.newVersion,
) room.roomSummary()?.isPublic ?: false
) )
_viewEvents.post(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand)) )
popDraft() _viewEvents.set(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand))
popDraft()
}
} }
} }
} }