T
- Type of the message for this event.public final class EventType<T> extends Object
An event is an action that happened in a room and contains a message. This class is final and cannot be instantiated, only the pre-defined constants must be used.
Modifier and Type | Field and Description |
---|---|
static EventType<KickedEvent> |
KICKED
Event raised when a user was kicked out of the chat room.
|
static EventType<MessageDeletedEvent> |
MESSAGE_DELETED
Event raised when a message is deleted.
|
static EventType<MessageEditedEvent> |
MESSAGE_EDITED
Event raised when a message is edited in a room.
|
static EventType<MessagePostedEvent> |
MESSAGE_POSTED
Event raised when a message is posted in a room.
|
static EventType<MessageReplyEvent> |
MESSAGE_REPLY
Event raised when a reply is posted to the current logged-in user.
|
static EventType<MessageStarredEvent> |
MESSAGE_STARRED
Event raised when a message is starred, unstarred, pinned or unpinned.
|
static EventType<UserEnteredEvent> |
USER_ENTERED
Event raised when a user is entering the chat room.
|
static EventType<UserLeftEvent> |
USER_LEFT
Event raised when a user is leaving the chat room, either as a result of inactivity or because they clicked the "leave" link.
|
static EventType<UserMentionedEvent> |
USER_MENTIONED
Event raised when a mention of the current logged-in user is made.
|
public static final EventType<MessagePostedEvent> MESSAGE_POSTED
All messages posted by users raise this event, even replies or mentions.
public static final EventType<MessageEditedEvent> MESSAGE_EDITED
All messages posted by users and then edited raise this event, even replies or mentions.
public static final EventType<MessageReplyEvent> MESSAGE_REPLY
:{messageId}
feature.
When this event is raised, a corresponding MESSAGE_POSTED
or MESSAGE_EDITED
will be raised.
This event is still useful to listen specifically to replies of one's messages instead of all posted / edited messages.
Note that you can reply to a previous message of yourself: if the current logged-in user posts a message starting
with :{messageId}
, where the message with that id is one of their own, this event will be raised.
public static final EventType<UserMentionedEvent> USER_MENTIONED
@{username}
feature.
When this event is raised, a corresponding MESSAGE_POSTED
or MESSAGE_EDITED
will be raised.
This event is still useful to listen specifically to mentions of the logged-in user instead of all posted / edited messages.
Note that you cannot mention yourself in a message: if the current logged-in user is foo
and they post a
message containing @foo
, this event will not be raised.
public static final EventType<UserEnteredEvent> USER_ENTERED
public static final EventType<UserLeftEvent> USER_LEFT
public static final EventType<MessageStarredEvent> MESSAGE_STARRED
public static final EventType<MessageDeletedEvent> MESSAGE_DELETED
public static final EventType<KickedEvent> KICKED