diff --git a/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomCellLayoutUpdater.swift b/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomCellLayoutUpdater.swift index 81f5ba3ef..d14024e42 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomCellLayoutUpdater.swift +++ b/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomCellLayoutUpdater.swift @@ -160,10 +160,7 @@ class BubbleRoomCellLayoutUpdater: RoomCellLayoutUpdating { switch firstEvent.eventType { case .roomMessage: - if let messageTypeString = firstEvent.content["msgtype"] as? String { - - let messageType = MXMessageType(identifier: messageTypeString) - + if let messageType = firstEvent.messageType { switch messageType { case .text, .emote, .file: return true diff --git a/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomTimelineCellDecorator.swift b/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomTimelineCellDecorator.swift index 26695c652..4ff2f0fae 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomTimelineCellDecorator.swift +++ b/Riot/Modules/Room/Views/BubbleCells/Styles/Bubble/BubbleRoomTimelineCellDecorator.swift @@ -217,10 +217,7 @@ class BubbleRoomTimelineCellDecorator: PlainRoomTimelineCellDecorator { switch firstEvent.eventType { case .roomMessage: - if let messageTypeString = firstEvent.content["msgtype"] as? String { - - let messageType = MXMessageType(identifier: messageTypeString) - + if let messageType = firstEvent.messageType { switch messageType { case .text, .emote, .file: return true