Record Class ChatRoomMention

java.lang.Object
java.lang.Record
io.meeds.chat.model.ChatRoomMention
Record Components:
roomKind - the kind of room, ChatRoomKind.SPACE today
eventId - the Matrix event id of the message
roomId - the Matrix room id, as the push named it
spaceId - the id of the room's space, null for a direct message
recipientLogin - the login of the mentioned worker
senderLogin - the login of the message's sender, null when the sender has no platform account
senderMatrixId - the Matrix id of the message's sender
body - the message's plain-text body
mentionedMatrixIds - the Matrix ids the message's m.mentions names
originServerTs - the message's origin_server_ts

public record ChatRoomMention(ChatRoomKind roomKind, String eventId, String roomId, Long spaceId, String recipientLogin, String senderLogin, String senderMatrixId, String body, List<String> mentionedMatrixIds, long originServerTs) extends Record
A mention of a digital worker in a chat room, the data of the matrix.agent.mentioned platform event (whose source is the room). Every field is read back from the event by the administrator account, never taken from the push, except the recipient, which the pusher's key names.
  • Constructor Details

    • ChatRoomMention

      public ChatRoomMention(ChatRoomKind roomKind, String eventId, String roomId, Long spaceId, String recipientLogin, String senderLogin, String senderMatrixId, String body, List<String> mentionedMatrixIds, long originServerTs)
      Creates an instance of a ChatRoomMention record class.
      Parameters:
      roomKind - the value for the roomKind record component
      eventId - the value for the eventId record component
      roomId - the value for the roomId record component
      spaceId - the value for the spaceId record component
      recipientLogin - the value for the recipientLogin record component
      senderLogin - the value for the senderLogin record component
      senderMatrixId - the value for the senderMatrixId record component
      body - the value for the body record component
      mentionedMatrixIds - the value for the mentionedMatrixIds record component
      originServerTs - the value for the originServerTs record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • roomKind

      public ChatRoomKind roomKind()
      Returns the value of the roomKind record component.
      Returns:
      the value of the roomKind record component
    • eventId

      public String eventId()
      Returns the value of the eventId record component.
      Returns:
      the value of the eventId record component
    • roomId

      public String roomId()
      Returns the value of the roomId record component.
      Returns:
      the value of the roomId record component
    • spaceId

      public Long spaceId()
      Returns the value of the spaceId record component.
      Returns:
      the value of the spaceId record component
    • recipientLogin

      public String recipientLogin()
      Returns the value of the recipientLogin record component.
      Returns:
      the value of the recipientLogin record component
    • senderLogin

      public String senderLogin()
      Returns the value of the senderLogin record component.
      Returns:
      the value of the senderLogin record component
    • senderMatrixId

      public String senderMatrixId()
      Returns the value of the senderMatrixId record component.
      Returns:
      the value of the senderMatrixId record component
    • body

      public String body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • mentionedMatrixIds

      public List<String> mentionedMatrixIds()
      Returns the value of the mentionedMatrixIds record component.
      Returns:
      the value of the mentionedMatrixIds record component
    • originServerTs

      public long originServerTs()
      Returns the value of the originServerTs record component.
      Returns:
      the value of the originServerTs record component