Package io.smooch.core
Class ConversationEvent
- java.lang.Object
-
- io.smooch.core.ConversationEvent
-
- All Implemented Interfaces:
java.io.Serializable
public final class ConversationEvent extends java.lang.Object implements java.io.SerializableObject representing a conversation event.- See Also:
ConversationEventType, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAvatarUrl()Returns the avatar URL of the participant related to this event if this event type isConversationEventType.CONVERSATION_READ,ConversationEventType.TYPING_STARTorConversationEventType.TYPING_STOP.java.lang.StringgetConversationId()Returns the ID of the parent conversation of this event.java.util.DategetLastRead()Returns the date of the last read message if this event type isConversationEventType.CONVERSATION_READ.java.lang.StringgetName()Returns the name of the participant related to this event if this event type isConversationEventType.CONVERSATION_READ,ConversationEventType.TYPING_STARTorConversationEventType.TYPING_STOP.java.lang.StringgetRole()Returns the role of the participant related to this event (typically "appUser" or "business") if this event type isConversationEventType.CONVERSATION_READ,ConversationEventType.TYPING_STARTorConversationEventType.TYPING_STOP.ConversationEventTypegetType()The type of event that is being triggered.java.lang.StringgetUserId()Always available forConversationEventType.PARTICIPANT_ADDEDandConversationEventType.PARTICIPANT_REMOVED.
-
-
-
Method Detail
-
getConversationId
public java.lang.String getConversationId()
Returns the ID of the parent conversation of this event.- Returns:
- the ID of the parent conversation of this event
-
getType
public ConversationEventType getType()
The type of event that is being triggered. SeeConversationEventTypefor possible types- Returns:
- The activity type
-
getUserId
public java.lang.String getUserId()
Always available forConversationEventType.PARTICIPANT_ADDEDandConversationEventType.PARTICIPANT_REMOVED.Available for
ConversationEventType.CONVERSATION_READ,ConversationEventType.TYPING_STARTandConversationEventType.TYPING_STOPif they were triggered by another app user.- Returns:
- the user ID if available, null otherwise
-
getRole
public java.lang.String getRole()
Returns the role of the participant related to this event (typically "appUser" or "business") if this event type isConversationEventType.CONVERSATION_READ,ConversationEventType.TYPING_STARTorConversationEventType.TYPING_STOP.- Returns:
- the role of the participant related to this event, or null if this event has no related participants
-
getName
public java.lang.String getName()
Returns the name of the participant related to this event if this event type isConversationEventType.CONVERSATION_READ,ConversationEventType.TYPING_STARTorConversationEventType.TYPING_STOP.- Returns:
- the name of the participant related to this event, or null if this event has no related participants
-
getAvatarUrl
public java.lang.String getAvatarUrl()
Returns the avatar URL of the participant related to this event if this event type isConversationEventType.CONVERSATION_READ,ConversationEventType.TYPING_STARTorConversationEventType.TYPING_STOP.- Returns:
- the avatar URL of the participant related to this event, or null if this event has no related participants
-
getLastRead
public java.util.Date getLastRead()
Returns the date of the last read message if this event type isConversationEventType.CONVERSATION_READ.- Returns:
- the date of the last read message if applicable to this event, null otherwise
-
-