Merge pull request #4086 from nextcloud/issue-4072-federated-accept-message-should-be-system

UI Fix: federated acceptance messages look like system messages
This commit is contained in:
Julius Linus 2024-08-21 08:36:53 -05:00 committed by GitHub
commit bb64e04c58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -407,7 +407,9 @@ data class ChatMessage(
BREAKOUT_ROOMS_STARTED,
BREAKOUT_ROOMS_STOPPED,
AVATAR_SET,
AVATAR_REMOVED
AVATAR_REMOVED,
FEDERATED_USER_ADDED,
FEDERATED_USER_REMOVED
}
companion object {

View file

@ -31,6 +31,8 @@ import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.CONVERSA
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.DESCRIPTION_REMOVED
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.DESCRIPTION_SET
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.DUMMY
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.FEDERATED_USER_ADDED
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.FEDERATED_USER_REMOVED
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.FILE_SHARED
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.GROUP_ADDED
import com.nextcloud.talk.chat.data.model.ChatMessage.SystemMessageType.GROUP_REMOVED
@ -136,6 +138,8 @@ class EnumSystemMessageTypeConverter : StringBasedTypeConverter<ChatMessage.Syst
"breakout_rooms_stopped" -> BREAKOUT_ROOMS_STOPPED
"avatar_set" -> AVATAR_SET
"avatar_removed" -> AVATAR_REMOVED
"federated_user_added" -> FEDERATED_USER_ADDED
"federated_user_removed" -> FEDERATED_USER_REMOVED
else -> DUMMY
}
}
@ -203,6 +207,8 @@ class EnumSystemMessageTypeConverter : StringBasedTypeConverter<ChatMessage.Syst
BREAKOUT_ROOMS_STOPPED -> "breakout_rooms_stopped"
AVATAR_SET -> "avatar_set"
AVATAR_REMOVED -> "avatar_removed"
FEDERATED_USER_ADDED -> "federated_user_added"
FEDERATED_USER_REMOVED -> "federated_user_removed"
else -> ""
}
}