mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-20 04:15:43 +00:00
core, ui: tolerate unknown MsgContentTag in chatContentTypes (#6805)
This commit is contained in:
@@ -458,7 +458,7 @@ func apiGetChat(chatId: ChatId, scope: GroupChatScope?, contentTag: MsgContentTa
|
||||
|
||||
func apiGetChatContentTypes(chatId: ChatId, scope: GroupChatScope? = nil) async throws -> [MsgContentTag] {
|
||||
let r: ChatResponse0 = try await chatSendCmd(.apiGetChatContentTypes(chatId: chatId, scope: scope))
|
||||
if case let .chatContentTypes(types) = r { return types }
|
||||
if case let .chatContentTypes(types) = r { return types.filter { if case .unknown = $0 { return false }; return true } }
|
||||
throw r.unexpected
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user