updateClient method

Future<void> updateClient(
  1. String clientId, [
  2. Object? data
])

Updates the data payload for a presence member using a given clientId, which is the ID of a client to update in the presence set.

Enables a single client to update presence on behalf of any number of clients using a single connection. The library must have been instantiated with an API key or a token bound to a wildcard clientId.

Implementation

Future<void> updateClient(String clientId, [Object? data]) async {
  await invoke<void>(PlatformMethod.realtimePresenceUpdate, {
    TxTransportKeys.channelName: _channel.name,
    TxTransportKeys.clientId: clientId,
    if (data != null) TxTransportKeys.data: MessageData.fromValue(data),
  });
}