redialChatCallMember method

  1. @override
Future<void> redialChatCallMember(
  1. ChatId chatId,
  2. UserId memberId
)
override

Redials a User who left or declined the ongoing ChatCall in the specified Chat-group by the authenticated MyUser.

Implementation

@override
Future<void> redialChatCallMember(ChatId chatId, UserId memberId) async {
  Log.debug('redialChatCallMember($chatId, $memberId)', '$runtimeType');

  final Rx<OngoingCall>? ongoing = calls[chatId];
  final CallMemberId id = CallMemberId(memberId, null);

  if (ongoing != null) {
    if (ongoing.value.members.keys.none((e) => e.userId == memberId)) {
      ongoing.value.members[id] = CallMember(
        id,
        null,
        isConnected: false,
        isDialing: true,
      );
    }
  }

  try {
    await _graphQlProvider.redialChatCallMember(chatId, memberId);
  } catch (_) {
    ongoing?.value.members.remove(id);
  }
}