Expose leave chat to iOS bridge

This commit is contained in:
Mikhail Kilin
2026-05-21 00:45:39 +03:00
parent 928a5aeda2
commit f7abd1dba0
7 changed files with 57 additions and 0 deletions

View File

@@ -284,6 +284,15 @@ public final class ProfileViewModel: ObservableObject {
errorMessage = error.localizedDescription
}
}
public func leave(chatId: Int64) async {
do {
try await bridge.leaveChat(chatId: chatId)
errorMessage = nil
} catch {
errorMessage = error.localizedDescription
}
}
}
@MainActor