sendCallReplaces method

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

CallReplacesEvent for Transfered calls

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. callReplaces transfer info

Implementation

Future<String?> sendCallReplaces(
    Room room, String callId, String party_id, CallReplaces callReplaces,
    {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,
    ...callReplaces.toJson(),
  };
  return await _sendContent(
    room,
    EventTypes.CallReplaces,
    content,
    txid: txid,
  );
}