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

This commit is contained in:
Narasimha-sc
2026-04-16 09:10:48 +00:00
committed by GitHub
parent ac6f8b76ac
commit e2a55291fc
4 changed files with 86 additions and 14 deletions

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
}