sendAssertedIdentity method

Future<String?> sendAssertedIdentity(
  1. Room room,
  2. String callId,
  3. String party_id,
  4. AssertedIdentity assertedIdentity, {
  5. String version = voipProtoVersion,
  6. String? txid,
})

send AssertedIdentity event

callId The ID of the call this event relates to. version is the version of the VoIP specification this message adheres to. This specification is version 1. party_id The party ID for call, Can be set to client.deviceId. assertedIdentity the asserted identity

Implementation

Future<String?> sendAssertedIdentity(Room room, String callId,
    String party_id, AssertedIdentity assertedIdentity,
    {String version = voipProtoVersion, String? txid}) async {
  txid ??= 'txid${DateTime.now().millisecondsSinceEpoch}';
  final content = {
    'call_id': callId,
    'party_id': party_id,
    if (groupCallId != null) 'conf_id': groupCallId,
    'version': version,
    'asserted_identity': assertedIdentity.toJson(),
  };
  return await _sendContent(
    room,
    EventTypes.CallAssertedIdentity,
    content,
    txid: txid,
  );
}