Commit 7cd098e2 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Add room_privacy_changed system message handling

parent 067edc43
......@@ -320,10 +320,10 @@ class UiModelMapper @Inject constructor(
val dayMarkerText = DateTimeHelper.getFormattedDateForMessages(localDateTime, context)
ActionsAttachmentUiModel(attachmentUrl = url, title = title,
actions = actions, buttonAlignment = buttonAlignment, message = message, rawData = attachment,
messageId = message.id, reactions = getReactions(message),
preview = message.copy(message = content.message), unread = message.unread,
showDayMarker = false, currentDayMarkerText = dayMarkerText)
actions = actions, buttonAlignment = buttonAlignment, message = message, rawData = attachment,
messageId = message.id, reactions = getReactions(message),
preview = message.copy(message = content.message), unread = message.unread,
showDayMarker = false, currentDayMarkerText = dayMarkerText)
}
}
......@@ -574,7 +574,7 @@ class UiModelMapper @Inject constructor(
private fun getSystemMessage(message: Message): CharSequence {
val content = when (message.type) {
//TODO: Add implementation for Welcome type.
//TODO: Add implementation for Welcome type.
is MessageType.MessageRemoved -> context.getString(R.string.message_removed)
is MessageType.UserJoined -> context.getString(R.string.message_user_joined_channel)
is MessageType.UserLeft -> context.getString(R.string.message_user_left)
......@@ -586,6 +586,7 @@ class UiModelMapper @Inject constructor(
is MessageType.UserUnMuted -> context.getString(R.string.message_unmuted, message.message, message.sender?.username)
is MessageType.SubscriptionRoleAdded -> context.getString(R.string.message_role_add, message.message, message.role, message.sender?.username)
is MessageType.SubscriptionRoleRemoved -> context.getString(R.string.message_role_removed, message.message, message.role, message.sender?.username)
is MessageType.RoomChangedPrivacy -> context.getString(R.string.message_room_changed_privacy, message.message, message.sender?.username)
else -> {
throw InvalidParameterException("Invalid message type: ${message.type}")
}
......
......@@ -286,4 +286,5 @@
<string name="notif_success_sending">Nachricht gesendet nach %1$s!</string>
<string name="read_by">Gelesen von</string>
<string name="message_information_title">Nachricht Information</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
\ No newline at end of file
......@@ -289,5 +289,6 @@
<string name="msg_file_description">Descripción del archivo</string>
<string name="msg_send">Enviar</string>
<string name="msg_sent_attachment">Envió un archivo</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
......@@ -290,4 +290,5 @@
<string name="message_information_title">Informations sur le message</string>
<string name="msg_log_out">Déconnecter…</string>
<string name="msg_sent_attachment">Envoyé un fichier</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
\ No newline at end of file
......@@ -291,4 +291,5 @@
<string name="read_by">द्वारा पढ़ें</string>
<string name="message_information_title">संदेश की जानकारी</string>
<string name="msg_log_out">लॉग आउट कर रहा हूं…</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
......@@ -292,4 +292,5 @@
<string name="notif_success_sending">メッセージは %1$s に送信されました!</string>
<string name="read_by">読者</string>
<string name="message_information_title">メッセージ情報</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
\ No newline at end of file
......@@ -289,4 +289,5 @@
<string name="message_information_title">Informações da mensagem</string>
<string name="msg_log_out">Deslogando…</string>
<string name="msg_sent_attachment">Enviou um arquivo</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
......@@ -285,4 +285,5 @@
<string name="read_by">Прочитано</string>
<string name="message_information_title">Информация о прочтении</string>
<string name="msg_log_out">Выходим…</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
......@@ -288,5 +288,6 @@
<string name="notif_success_sending">Mesaj %1$s\'a gönderildi!</string>
<string name="read_by">ile oku</string>
<string name="message_information_title">Mesaj bilgisi</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
......@@ -287,4 +287,5 @@
<string name="message_information_title">Інформація про прочитання</string>
<string name="msg_log_out">Виходимо…</string>
<string name="msg_sent_attachment">Долучення відправлено</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
......@@ -303,4 +303,5 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="message_information_title">Message information</string>
<string name="foss" tools:ignore="MissingTranslation">(FOSS)</string>
<string name="message_room_changed_privacy">Room type changed to: %1$s by %2$s</string>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment