MessageContent.type cannot be null
This commit is contained in:
parent
1b0e044565
commit
8c2a5f281b
3 changed files with 3 additions and 5 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue