SlashCommand: add TODO

This commit is contained in:
Benoit Marty 2019-04-09 15:21:17 +02:00
parent 3b52fa4be8
commit 63964ac101
3 changed files with 44 additions and 3 deletions

View File

@ -205,7 +205,7 @@ object CommandParser {
} }
Command.CLEAR_SCALAR_TOKEN.command -> { Command.CLEAR_SCALAR_TOKEN.command -> {
return if (messageParts.size == 1) { return if (messageParts.size == 1) {
ParsedCommand.ClearSclalarToken ParsedCommand.ClearScalarToken
} else { } else {
ParsedCommand.ErrorSyntax(Command.CLEAR_SCALAR_TOKEN) ParsedCommand.ErrorSyntax(Command.CLEAR_SCALAR_TOKEN)
} }

View File

@ -44,5 +44,5 @@ sealed class ParsedCommand {
class KickUser(val userId: String, val reason: String) : ParsedCommand() class KickUser(val userId: String, val reason: String) : ParsedCommand()
class ChangeDisplayName(val displayName: String) : ParsedCommand() class ChangeDisplayName(val displayName: String) : ParsedCommand()
class SetMarkdown(val enable: Boolean) : ParsedCommand() class SetMarkdown(val enable: Boolean) : ParsedCommand()
object ClearSclalarToken : ParsedCommand() object ClearScalarToken : ParsedCommand()
} }

View File

@ -103,7 +103,48 @@ class RoomDetailViewModel(initialState: RoomDetailViewState,
is ParsedCommand.Invite -> { is ParsedCommand.Invite -> {
handleInviteSlashCommand(slashCommandResult) handleInviteSlashCommand(slashCommandResult)
} }
else -> { is ParsedCommand.SetUserPowerLevel -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.ClearScalarToken -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.SetMarkdown -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.UnbanUser -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.BanUser -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.KickUser -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.JoinRoom -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.PartRoom -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.SendEmote -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.ChangeTopic -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
}
is ParsedCommand.ChangeDisplayName -> {
// TODO
_sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented)) _sendMessageResultLiveData.postValue(LiveEvent(SendMessageResult.SlashCommandNotImplemented))
} }
} }