func toMessageType()

in AzureCommunicationUI/sdk/AzureCommunicationUIChat/Sources/Service/Chat/Extension/ChatMessageExtension.swift [28:48]


    func toMessageType() -> MessageType {
        switch self {
        case .custom(let str):
            if str.lowercased() == "richtext/html" {
                return .html
            }
            return .custom(str)
        case .text:
            return .text
        case .html:
            return .html
        case .topicUpdated:
            return .topicUpdated
        case .participantAdded:
            return .participantsAdded
        case .participantRemoved:
            return .participantsRemoved
        @unknown default:
            return .custom("Unknown Type")
        }
    }