onAssertedIdentityReceived method

Future<void> onAssertedIdentityReceived(
  1. String roomId,
  2. String senderId,
  3. Map<String, dynamic> content
)

Implementation

Future<void> onAssertedIdentityReceived(
    String roomId, String senderId, Map<String, dynamic> content) async {
  if (senderId == client.userID) {
    // Ignore messages to yourself.
    return;
  }
  final String callId = content['call_id'];
  Logs().d('Asserted identity received for call ID $callId');
  final call = calls[callId];
  if (call != null) {
    if (call.room.id != roomId) {
      Logs().w(
          'Ignoring call asserted identity for room $roomId claiming to be for call in room ${call.room.id}');
      return;
    }

    if (content['asserted_identity'] == null) {
      Logs().d('asserted_identity is null ');
      return;
    }
    call.onAssertedIdentityReceived(
        AssertedIdentity.fromJson(content['asserted_identity']));
  }
}