mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:05:28 +00:00
MessageContent.type cannot be null
This commit is contained in:
committed by
Benoit Marty
parent
1b0e044565
commit
8c2a5f281b
+1
-1
@@ -49,7 +49,7 @@ class TimelineItemContentMessageFactory @Inject constructor(
|
||||
) {
|
||||
|
||||
fun create(content: MessageContent, senderDisplayName: String): TimelineItemEventContent {
|
||||
return when (val messageType = content.type ?: UnknownMessageType) {
|
||||
return when (val messageType = content.type) {
|
||||
is EmoteMessageType -> TimelineItemEmoteContent(
|
||||
body = "* $senderDisplayName ${messageType.body}",
|
||||
htmlDocument = messageType.formatted?.toHtmlDocument(prefix = "* senderDisplayName"),
|
||||
|
||||
Reference in New Issue
Block a user