Options
All
  • Public
  • Public/Protected
  • All
Menu

Event types of the RtmChannel instance. In this interface, the function property’s name is the event name; the function property’s parameters is the parameters of the event listener function.

example

Listening to channel messages.

channel.on('ChannelMessage', function (message, memberId) {
// Your code.
});
example

Listening to events, such as a user joining the channel.

channel.on('MemberJoined', memberId => {
// Your code.
})
example

Listening to events, such as a member leaving the channel

channel.on('MemberLeft', memberId => {
// Your code.
});

Hierarchy

  • RtmChannelEvents

Index

Events

AttributesUpdated

  • Occurs when channel attributes are updated, and returns all attributes of the channel.

    Note

    This callback is enabled only when the user, who updates the attributes of the channel, sets enableNotificationToChannelMembers as true. Also note that this flag is valid only within the current channel attribute method call.

    Parameters

    Returns void

ChannelMessage

  • Occurs when the local user receives a channel message.

    Parameters

    Returns void

MemberCountUpdated

  • MemberCountUpdated(memberCount: number): void
  • Occurs when the number of the channel members changes, and returns the new number.

    Note

  • When the number of channel members ≤ 512, the SDK returns this callback when the number changes at a frequency of once per second.
  • When the number of channel members exceeds 512, the SDK returns this callback when the number changes at a frequency of once every three seconds.
  • You will receive this callback when successfully joining an RTM channel, so we recommend implementing this callback to receive timely updates on the number of the channel members.

Parameters

Returns void

MemberJoined

MemberLeft

Generated using TypeDoc