remove method
- ChatId chatId
override
Ends an OngoingCall happening in the Chat identified by the provided
chatId.
Implementation
@override
Rx<OngoingCall>? remove(ChatId chatId) {
Log.debug('remove($chatId)', '$runtimeType');
if (chatId.isLocal) {
final UserId userId = chatId.userId;
final RxUser? user = _userRepo.users[userId];
chatId = user?.user.value.dialog ?? chatId;
}
final Rx<OngoingCall>? call = calls.remove(chatId);
call?.value.state.value = OngoingCallState.ended;
call?.value.dispose();
return call;
}