Group Chats
XXMessengerClient
-
Add GroupRequestCallbacksRegistry
andGroupChatProcessorRegistry
-
Add MessengerStartGroupChat
-
Update docs - describe how to start group chats
This MR does NOT contain functions for sending group messages, but it can be done directly on the group chat manager:
// register callbacks:
let groupRequestsCancellable = messenger.registerGroupRequestHandler(.init { group in
// handle group request...
})
let groupChatProcessorCancellable = messenger.registerGroupChatProcessor(.init { result in
switch result {
case .success(let callback):
// handle group chat processor callback...
case .failure(let error):
// handle error...
}
})
// start group chat manager:
try messenger.startGroupChat()
if let groupChat = messenger.groupChat() {
// Use XXClient.GroupChat API directly...
}