leave method
- ChatId chatId,
- ChatCallDeviceId deviceId
override
Leaves the current OngoingCall in the specified chatId
by the
authenticated MyUser.
Implementation
@override
Future<void> leave(ChatId chatId, ChatCallDeviceId deviceId) async {
Log.debug('leave($chatId, $deviceId)', '$runtimeType');
try {
await _graphQlProvider.leaveChatCall(chatId, deviceId);
} on LeaveChatCallException catch (e) {
switch (e.code) {
case LeaveChatCallErrorCode.unknownDevice:
case LeaveChatCallErrorCode.unknownChat:
// No-op.
break;
case LeaveChatCallErrorCode.artemisUnknown:
rethrow;
}
}
}