addEventHandler method

void addEventHandler(
  1. String identifier,
  2. ChatPresenceEventHandler handler
)

~english Adds the presence event handler. After calling this method, you can handle for new presence event when they arrive.

Param identifier The custom handler identifier, is used to find the corresponding handler.

Param handler The handle for presence event. See ChatPresenceEventHandler. ~end

~chinese 添加用户状态变化监听器。

Param identifier 事件 ID。

Param handler Presence 事件。 ~end

Implementation

void addEventHandler(
  String identifier,
  ChatPresenceEventHandler handler,
) {
  _eventHandlesMap[identifier] = handler;
}