|
|
CommonMessage
Common Structure
Message
Several API methods return documents describing messages. The description of each message contains the following fields:
id
- The unique id of the message
type
- The type of the message. Possible values are as follows:
user
- This message was spoken by a user and sent publicly
private
- This message was spoken by a user and sent privately to the recipient
system:enter
- This is an administrative message sent by the system when some new occupant entered the room.
system:nickname_change
- This is an administrative message sent by the system when some occupant changed their nickname.
system:leave
- This is an administrative message sent by the system when some occupant left the room.
system:broadcast
- This is a broadcast message sent by the system to all rooms
occupant_id
- For messages of type user, this is the id of the speaker. For system:broadcast messages, this element is omitted. For all other system:* message types, this is the id of the occupant to which this message applies.
user_id
- The user id of the occupant to which this message applies. This element is only present if this speaker was logged in.
nickname
- The nickname of the occupant to whom this message applies. For system:broadcast messages, this element is omitted.
new_nickname
- The new nickname of the occupant, in the case of system:nickname_change messages. For other message types, this element is omitted.
source
- How the referenced occupant is interacting with the chatroom. A value of browser means that the occupant is using the Lingr website at www.lingr.com, A value of api means that the occupant is using some Lingr API application.
client_type
- The type of the referenced occupant’s client application- either human or automaton. A client of type human is operated by a human being. A client of type automaton speaks in chatrooms without human intervention. For more information, see the client_type page.
icon_url
- The url of the avatar icon for the speaker. This url has the structure described here
timestamp
- The timestamp of the message, in ISO-8601 combined format YYYY-MM-DDThh:mm:ssTZD
room_id
- The id of the room containing the message. This element appears only in the messages returned from explore.searchArchives
score
- The matching score of this message relative to the other messages within the enclosing element. The score is expressed as a floating point number in the range of [0..1], with 1 representing the highest score (and closest match). This element appears only in the messages returned from explore.searchArchives
text
- The text of the message
