fix(MessageView): Explicit type check for messageComponent

This commit is contained in:
Igor Sirotin 2023-05-02 17:28:11 +03:00 committed by Jonathan Rainville
parent ac6cebed9f
commit c6f378b968

View File

@ -210,8 +210,20 @@ Loader {
return gapComponent return gapComponent
case Constants.messageContentType.newMessagesMarker: case Constants.messageContentType.newMessagesMarker:
return newMessagesMarkerComponent return newMessagesMarkerComponent
default: case Constants.messageContentType.messageType:
case Constants.messageContentType.stickerType:
case Constants.messageContentType.emojiType:
case Constants.messageContentType.transactionType:
case Constants.messageContentType.imageType:
case Constants.messageContentType.audioType:
case Constants.messageContentType.communityInviteType:
case Constants.messageContentType.discordMessageType:
return messageComponent return messageComponent
case Constants.messageContentType.unknownContentType:
// NOTE: We could display smth like "unknown message type, please upgrade Status to see it".
return null
default:
return null
} }
} }