Remove `/verify` command, it was added temporarily

This commit is contained in:
Benoit Marty 2020-08-17 14:41:07 +02:00
parent 1c48ba6b99
commit ac32d6bb29
18 changed files with 1 additions and 31 deletions

View File

@ -44,9 +44,7 @@ enum class Command(val command: String, val parameters: String, @StringRes val d
POLL("/poll", "Question | Option 1 | Option 2 ...", R.string.command_description_poll),
SHRUG("/shrug", "<message>", R.string.command_description_shrug),
PLAIN("/plain", "<message>", R.string.command_description_plain),
DISCARD_SESSION("/discardsession", "", R.string.command_description_discard_session),
// TODO temporary command
VERIFY_USER("/verify", "<user-id>", R.string.command_description_verify);
DISCARD_SESSION("/discardsession", "", R.string.command_description_discard_session);
val length
get() = command.length + 1

View File

@ -279,11 +279,6 @@ object CommandParser {
ParsedCommand.SendShrug(message)
}
Command.VERIFY_USER.command -> {
val message = textMessage.substring(Command.VERIFY_USER.command.length).trim()
ParsedCommand.VerifyUser(message)
}
Command.POLL.command -> {
val rawCommand = textMessage.substring(Command.POLL.command.length).trim()
val split = rawCommand.split("|").map { it.trim() }

View File

@ -53,7 +53,6 @@ sealed class ParsedCommand {
object ClearScalarToken : ParsedCommand()
class SendSpoiler(val message: String) : ParsedCommand()
class SendShrug(val message: CharSequence) : ParsedCommand()
class VerifyUser(val userId: String) : ParsedCommand()
class SendPoll(val question: String, val options: List<String>) : ParsedCommand()
object DiscardSession: ParsedCommand()
}

View File

@ -656,14 +656,6 @@ class RoomDetailViewModel @AssistedInject constructor(
_viewEvents.post(RoomDetailViewEvents.SlashCommandHandled())
popDraft()
}
is ParsedCommand.VerifyUser -> {
session
.cryptoService()
.verificationService()
.requestKeyVerificationInDMs(supportedVerificationMethodsProvider.provide(), slashCommandResult.userId, room.roomId)
_viewEvents.post(RoomDetailViewEvents.SlashCommandHandled())
popDraft()
}
is ParsedCommand.SendPoll -> {
room.sendPoll(slashCommandResult.question, slashCommandResult.options.mapIndexed { index, s -> OptionItem(s, "$index. $s") })
_viewEvents.post(RoomDetailViewEvents.SlashCommandHandled())

View File

@ -1909,7 +1909,6 @@ Vaši e-mailovou adresu můžete přidat k profilu v nastavení.</string>
<string name="settings_developer_mode_fail_fast_title">Fail-fast</string>
<string name="settings_developer_mode_fail_fast_summary">Element se může zbořit častěji, když se objeví neočekávané chyby</string>
<string name="command_description_verify">Požadavek ověření daného uživatelského ID</string>
<string name="command_description_shrug">Předsune ¯\\_(ツ)_/¯ do textové zprávy</string>
<string name="create_room_encryption_title">Zapnout šifrování</string>

View File

@ -1987,7 +1987,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine
<string name="settings_developer_mode_fail_fast_title">Ausfallsicher</string>
<string name="settings_developer_mode_fail_fast_summary">Element kann häufiger abstürzen, wenn ein unerwarteter Fehler auftritt</string>
<string name="command_description_verify">Überprüfe die angegebenen Nutzer-ID</string>
<string name="command_description_shrug">Stellt einer Klartextnachricht ¯\\_(ツ)_/¯ voran</string>
<string name="create_room_encryption_title">Aktiviere Verschlüsselung</string>

View File

@ -1929,7 +1929,6 @@ Abisua: Fitxategi hau ezabatu daiteke aplikazioa desinstalatzen bada.</string>
<string name="settings_developer_mode_fail_fast_title">Hutsegin-azkar</string>
<string name="settings_developer_mode_fail_fast_summary">Element aplikazioa ustekabeko erroreen aurrean maizago kraskatu daiteke</string>
<string name="command_description_verify">Eskatu emandako erabiltzaile IDa egiaztatzea</string>
<string name="command_description_shrug">"Jarri ¯\\_(ツ)_/¯ testu-soileko mezuaren aurretik"</string>
<string name="create_room_encryption_title">Gaitu zifratzea</string>

View File

@ -2016,7 +2016,6 @@ Haluatko lisätä paketteja?</string>
<string name="verification_conclusion_not_secure">Ei turvallinen</string>
<string name="sent_a_video">Video.</string>
<string name="sent_an_image">Kuva.</string>
<string name="command_description_verify">Pyyntö annetun käyttäjä-ID:n vahvistamiseksi</string>
<string name="verification_conclusion_compromised">Johonkin näistä on mahdollisesti murtauduttu:
\n
\n - Kotipalvelimesi

View File

@ -1933,7 +1933,6 @@ Si vous navez pas configuré de nouvelle méthode de récupération, un attaq
<string name="settings_developer_mode_fail_fast_title">Défaillance rapide</string>
<string name="settings_developer_mode_fail_fast_summary">Element peut planter plus souvent quand une erreur inattendue survient</string>
<string name="command_description_verify">Demande de vérification de lidentifiant utilisateur fourni</string>
<string name="command_description_shrug">Préfixe ¯\\_(ツ)_/¯ à un message en texte brut</string>
<string name="create_room_encryption_title">Activer le chiffrement</string>

View File

@ -1930,7 +1930,6 @@ Ha nem te állítottad be a visszaállítási metódust, akkor egy támadó pró
<string name="settings_developer_mode_fail_fast_title">Összeomlás-hamar</string>
<string name="settings_developer_mode_fail_fast_summary">Element a nem várt hibák esetén többször fog összeomlani</string>
<string name="command_description_verify">Az adott felhasználói azonosító ellenőrzésének kérése</string>
<string name="command_description_shrug">Hozzáteszi a sima szöveges üzenethez ezt: ¯\\_(ツ)_/¯</string>
<string name="create_room_encryption_title">Titkosítás engedélyezése</string>

View File

@ -1981,7 +1981,6 @@
<string name="settings_developer_mode_fail_fast_title">Crash facile</string>
<string name="settings_developer_mode_fail_fast_summary">Element potrebbe crashare più spesso quando si verifica un errore imprevisto</string>
<string name="command_description_verify">Richiedi di verificare l\'ID utente in questione</string>
<string name="command_description_shrug">Antepone ¯\\_(ツ)_/¯ ad un messaggio testuale</string>
<string name="create_room_encryption_title">Attiva la cifratura</string>

View File

@ -1915,7 +1915,6 @@ Spróbuj uruchomić ponownie aplikację.</string>
<string name="settings_developer_mode_fail_fast_title">Bezproblemowy</string>
<string name="settings_developer_mode_fail_fast_summary">Element może zawieszać się częściej gdy napotka na niespodziewany błąd</string>
<string name="command_description_verify">Żądanie weryfikujące podany userID</string>
<string name="command_description_shrug">Preparuje ¯\\_(ツ)_/¯ dla zwykłej wiadomości tekstowej</string>
<string name="create_room_encryption_title">Aktywuj szyfrowanie</string>

View File

@ -2112,7 +2112,6 @@ Na próxima tela, você será solicitado a permitir que o Element funcione sempr
<string name="settings_developer_mode_fail_fast_title">Relatar imediatamente as falhas</string>
<string name="settings_developer_mode_fail_fast_summary">Element pode quebrar com mais freqüência quando ocorre um erro inesperado</string>
<string name="command_description_verify">Solicitação para verificar o ID do usuário</string>
<string name="command_description_shrug">Adicionar ¯\\_(ツ)_/¯ para uma mensagem de texto simples</string>
<string name="create_room_encryption_title">Ativar criptografia</string>

View File

@ -2214,7 +2214,6 @@
<string name="settings_developer_mode_fail_fast_title">Раннее падение</string>
<string name="settings_developer_mode_fail_fast_summary">Element может падать чаще, когда происходит непредвиденная ошибка</string>
<string name="command_description_verify">Запрос на проверку данного идентификатора пользователя</string>
<string name="command_description_shrug">Добавляет смайл ¯\\_(ツ)_/¯ в начало сообщения</string>
<string name="create_room_encryption_description">После включения шифрования оно не может быть отключено.</string>

View File

@ -1890,7 +1890,6 @@
<string name="settings_developer_mode_fail_fast_summary">Element mund të vithiset më shpesh, kur ndodh një gabim i papritur</string>
<string name="settings_call_ringtone_use_default_stun">Lejoni shërbyes rrugëzgjidhje asistimi thirrjesh</string>
<string name="command_description_verify">Kërko të verifikohet userID-ja i dhënë</string>
<string name="command_description_shrug">Parashtoji ¯\\_(ツ)_/¯ një mesazhi tekst të thjeshtë</string>
<string name="create_room_encryption_title">Aktivizoni fshehtëzim</string>

View File

@ -2020,7 +2020,6 @@ Element 在后台时的工作将被显著的限制,这可能会影响消息通
<string name="settings_developer_mode_fail_fast_title">快速失败</string>
<string name="settings_developer_mode_fail_fast_summary">发生意外错误时Element 可能更经常崩溃</string>
<string name="command_description_verify">请求验证给定 userID</string>
<string name="command_description_shrug">在明文消息前添加 ¯\\_(ツ)_/¯</string>
<string name="create_room_encryption_title">启用加密</string>

View File

@ -1884,7 +1884,6 @@ Matrix 中的消息可見度類似于電子郵件。我們忘記您的郵件意
<string name="settings_developer_mode_fail_fast_title">快速失敗</string>
<string name="settings_developer_mode_fail_fast_summary">在發生非預期的錯誤時Element 可能更常當機</string>
<string name="command_description_verify">請求驗證給定的 userID</string>
<string name="command_description_shrug">"將 ¯\\_(ツ)_/¯ 附加到純文字訊息中"</string>
<string name="create_room_encryption_title">啟用加密</string>

View File

@ -2022,7 +2022,6 @@
<string name="settings_developer_mode_fail_fast_title">Fail-fast</string>
<string name="settings_developer_mode_fail_fast_summary">Element may crash more often when an unexpected error occurs</string>
<string name="command_description_verify">Request to verify the given userID</string>
<string name="command_description_shrug">Prepends ¯\\_(ツ)_/¯ to a plain-text message</string>
<string name="create_room_encryption_title">"Enable encryption"</string>