AttachedClients
AttachedClients =
object&TypedEventEmitter<ClientEvents>
Query and subscribe to client attachment state for your app.
Type Declaration
getClient()
getClient(
userId:UserGuid,communityId?:CommunityGuid):Client|undefined
Get a specific attached member by user ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
userId | UserGuid | The user's GUID. |
communityId? | CommunityGuid | - |
Returns
Client | undefined
The Client object if the member has your app open, or undefined if not. The Client.deviceId property is undefined on the returned object; use Client.deviceIds to get the member's connected devices.
getClients()
getClients(
communityId?:CommunityGuid):Client[]
Get all members who currently have your app's channel open.
Parameters
| Parameter | Type |
|---|---|
communityId? | CommunityGuid |
Returns
Client[]
Array of Client objects representing attached members. The Client.deviceId property is undefined on these objects; use Client.deviceIds to get the member's connected devices.
getDeviceIds()
getDeviceIds(
communityId?:CommunityGuid):string[]
Get all device IDs for members who currently have your app open.
Parameters
| Parameter | Type |
|---|---|
communityId? | CommunityGuid |
Returns
string[]
Array of device ID strings.