diff --git a/matrix-sdk-android/src/main/res/values-bg/strings_sas.xml b/matrix-sdk-android/src/main/res/values-bg/strings_sas.xml
new file mode 100644
index 0000000000..e2ee9faefc
--- /dev/null
+++ b/matrix-sdk-android/src/main/res/values-bg/strings_sas.xml
@@ -0,0 +1,68 @@
+
+
+
+ Куче
+ Котка
+ Лъв
+ Кон
+ Еднорог
+ Прасе
+ Слон
+ Заек
+ Панда
+ Петел
+ Пингвин
+ Костенурка
+ Риба
+ Октопод
+ Пеперуда
+ Цвете
+ Дърво
+ Кактус
+ Гъба
+ Глобус
+ Луна
+ Облак
+ Огън
+ Банан
+ Ябълка
+ Ягода
+ Царевица
+ Пица
+ Торта
+ Сърце
+ Усмивка
+ Робот
+ Шапка
+ Очила
+ Гаечен ключ
+ Дядо Коледа
+ Палец нагоре
+ Чадър
+ Пясъчен часовник
+ Часовник
+ Подарък
+ Лампа
+ Книга
+ Молив
+ Кламер
+ Ножици
+ Катинар
+ Ключ
+ Чук
+ Телефон
+ Флаг
+ Влак
+ Колело
+ Самолет
+ Ракета
+ Трофей
+ Топка
+ Китара
+ Тромпет
+ Звънец
+ Котва
+ Слушалки
+ Папка
+ Кабърче
+
diff --git a/matrix-sdk-android/src/main/res/values-ca/strings_sas.xml b/matrix-sdk-android/src/main/res/values-ca/strings_sas.xml
new file mode 100644
index 0000000000..acc0dcbc72
--- /dev/null
+++ b/matrix-sdk-android/src/main/res/values-ca/strings_sas.xml
@@ -0,0 +1,68 @@
+
+
+
+ Gos
+ Gat
+ Lleó
+ Cavall
+ Unicorn
+ Porc
+ Elefant
+ Conill
+ Panda
+ Gall
+ Pingüí
+ Tortuga
+ Peix
+ Pop
+ Papallona
+ Flor
+ Arbre
+ Cactus
+ Bolet
+ Globus terraqüi
+ Lluna
+ Núvol
+ Foc
+ Plàtan
+ Poma
+ Maduixa
+ Blat de moro
+ Pizza
+ Pastís
+ Cor
+ Somrient
+ Robot
+ Barret
+ Ulleres
+ Clau anglesa
+ Pare Noél
+ Polzes amunt
+ Paraigües
+ Rellotge de sorra
+ Rellotge
+ Regal
+ Bombeta
+ Llibre
+ Llapis
+ Clip
+ Tisores
+ Cadenat
+ Clau
+ Martell
+ Telèfon
+ Bandera
+ Tren
+ Bicicleta
+ Avió
+ Coet
+ Trofeu
+ Pilota
+ Guitarra
+ Trompeta
+ Campana
+ Àncora
+ Auriculars
+ Carpeta
+ Xinxeta
+
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/ChatEffectManager.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/ChatEffectManager.kt
index ee663b9bbd..e7136762d5 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/ChatEffectManager.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/ChatEffectManager.kt
@@ -113,6 +113,7 @@ class ChatEffectManager @Inject constructor() {
return when (content.msgType) {
MessageType.MSGTYPE_CONFETTI -> ChatEffect.CONFETTI
MessageType.MSGTYPE_SNOW -> ChatEffect.SNOW
+ MessageType.MSGTYPE_EMOTE,
MessageType.MSGTYPE_TEXT -> {
event.root.getClearContent().toModel()?.body
?.let { text ->
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewModel.kt
index d34d01080e..e4e7177e4f 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewModel.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewModel.kt
@@ -716,7 +716,7 @@ class RoomDetailViewModel @AssistedInject constructor(
popDraft()
}
is ParsedCommand.SendChatEffect -> {
- room.sendTextMessage(slashCommandResult.message, slashCommandResult.chatEffect.toMessageType())
+ sendChatEffect(slashCommandResult)
_viewEvents.post(RoomDetailViewEvents.SlashCommandHandled())
popDraft()
}
@@ -808,6 +808,19 @@ class RoomDetailViewModel @AssistedInject constructor(
}
}
+ private fun sendChatEffect(sendChatEffect: ParsedCommand.SendChatEffect) {
+ // If message is blank, convert to an emote, with default message
+ if (sendChatEffect.message.isBlank()) {
+ val defaultMessage = stringProvider.getString(when (sendChatEffect.chatEffect) {
+ ChatEffect.CONFETTI -> R.string.default_message_emote_confetti
+ ChatEffect.SNOW -> R.string.default_message_emote_snow
+ })
+ room.sendTextMessage(defaultMessage, MessageType.MSGTYPE_EMOTE)
+ } else {
+ room.sendTextMessage(sendChatEffect.message, sendChatEffect.chatEffect.toMessageType())
+ }
+ }
+
private fun popDraft() = withState {
if (it.sendMode is SendMode.REGULAR && it.sendMode.fromSharing) {
// If we were sharing, we want to get back our last value from draft
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/NoticeEventFormatter.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/NoticeEventFormatter.kt
index 9b828e9410..c725f5b7dc 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/NoticeEventFormatter.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/NoticeEventFormatter.kt
@@ -182,8 +182,8 @@ class NoticeEventFormatter @Inject constructor(
}
}
- private fun formatDebug(event: Event): CharSequence? {
- return "{ \"type\": ${event.getClearType()} }"
+ private fun formatDebug(event: Event): CharSequence {
+ return "Debug: event type \"${event.getClearType()}\""
}
private fun formatRoomCreateEvent(event: Event, rs: RoomSummary?): CharSequence? {
diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml
index 8376e9e9dd..76541460d2 100644
--- a/vector/src/main/res/values/strings.xml
+++ b/vector/src/main/res/values/strings.xml
@@ -2572,6 +2572,10 @@
Sends the given message with confetti
Sends the given message with snow
+
+ sends confetti 🎉
+
+ sends snow ❄️
Unencrypted
Encrypted by an unverified device