decline method
- ChatId chatId
override
Declines the current OngoingCall in the specified chatId
by the
authenticated MyUser.
Implementation
@override
Future<void> decline(ChatId chatId) async {
Log.debug('decline($chatId)', '$runtimeType');
try {
await _graphQlProvider.declineChatCall(chatId);
} on DeclineChatCallException catch (e) {
switch (e.code) {
case DeclineChatCallErrorCode.alreadyJoined:
// No-op, as this can be expected.
break;
case DeclineChatCallErrorCode.unknownChat:
case DeclineChatCallErrorCode.artemisUnknown:
rethrow;
}
} finally {
calls.remove(chatId);
}
}