From 796dc7588210448f109d408ddf1892102ba29134 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Mon, 4 Jan 2021 13:08:26 -0300 Subject: [PATCH] [FIX] Jitsi notification delay (#2668) Co-authored-by: Diego Mello --- ios/Shared/Models/MessageType.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ios/Shared/Models/MessageType.swift b/ios/Shared/Models/MessageType.swift index 8e250330..75c1b461 100644 --- a/ios/Shared/Models/MessageType.swift +++ b/ios/Shared/Models/MessageType.swift @@ -10,4 +10,14 @@ import Foundation enum MessageType: String, Codable { case e2e + case unknown + + public init(from decoder: Decoder) throws { + guard let rawValue = try? decoder.singleValueContainer().decode(String.self) else { + self = .unknown + return + } + + self = MessageType(rawValue: rawValue) ?? .unknown + } }