identify method
Identify the current end-user (shorthand for sessions.identify).
Implementation
Future<void> identify(
String distinctId, {
String? email,
String? name,
String? phone,
Map<String, Object?>? traits,
}) async {
await sessions.identify(
distinctId,
email: email,
name: name,
phone: phone,
traits: traits,
);
// Voice binds its realtime room + push device at init (before login), so
// re-bind to the newly-identified user — otherwise incoming calls would keep
// ringing on the pre-login device room, never on `voice:<distinctId>`.
if (config.voiceEnabled) await voice.rebindIdentity();
}