Class ChatLog

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  ChatLog.AttachmentMessage
      Chat log with an additional attachment field.
      static class  ChatLog.Comment
      Chat log with an additional fields for the previous and new chat comment.
      static class  ChatLog.Message
      Chat log with an additional message field.
      static class  ChatLog.Rating
      Chat log with an additional fields for the previous and new chat rating.
      static class  ChatLog.Type
      All possible types of chat logs.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.util.Comparator<ChatLog> TIMESTAMP_COMPARATOR
      Comparator to sort ChatLogs based on their timestamps.
    • Field Detail

      • TIMESTAMP_COMPARATOR

        public static java.util.Comparator<ChatLog> TIMESTAMP_COMPARATOR
        Comparator to sort ChatLogs based on their timestamps.
    • Method Detail

      • getId

        public java.lang.String getId()
        Gets an unique identifier of this chat log.
      • getLastModifiedTimestamp

        public long getLastModifiedTimestamp()
        Gets epoch timestamp at which this chat log was last modified.
      • getNick

        public java.lang.String getNick()
        Gets an unique identifier of the participant from whom this log originated from.
        Given ChatLog.getChatParticipant() returns ChatParticipant.AGENT, this nick can be matched against Agent.getId() to find a corresponding Agent object that provides more information about the agent.

        A sample Kotlin code looks as follows:

        
         if(chatLog.chatParticipant == ChatParticipant.AGENT) {
             val agent = chatState.agents.filter { it.id == chatLog.nick}.first()
         }
         
        Returns:
        A unique identifier of the participant or null.
        See Also:
        ChatState.getAgents(), Agent.getId(), ChatParticipant
      • getDisplayName

        public java.lang.String getDisplayName()
        Gets the display name of the participant from who this log originated from.

        Note, this could be null given a pending or failed visitor message. For all other participants, the display name is guaranteed not to be null.

        Returns:
        The display name of null
      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object