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,17 +472,19 @@ class MessageComposerViewModel @AssistedInject constructor(
Unit
}
is ParsedCommand.UpgradeRoom -> {
_viewEvents.post(
viewModelScope.launch {
_viewEvents.set(
MessageComposerViewEvents.ShowRoomUpgradeDialog(
parsedCommand.newVersion,
room.roomSummary()?.isPublic ?: false
)
)
_viewEvents.post(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand))
_viewEvents.set(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand))
popDraft()
}
}
}
}
is SendMode.Edit -> {
// is original event a reply?
val relationContent = state.sendMode.timelineEvent.getRelationContent()