addEventHandler method

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

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.

Implementation

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