core, ui: tolerate unknown MsgContentTag in chatContentTypes (#6805)

This commit is contained in:
Narasimha-sc authored and GitHub committed 2026-04-16 10:10:48 +01:00
1 parent ac6f8b76ac
commit e2a55291fc
4 files changed
+86 -14

No files matched your search

+1 -1
View File
@@ -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
}