Marketplace API / Types
ChatMessage
ObjectA message in a chat channel or a direct conversation.
type ChatMessage implements NodeFields
| Field | Type | Description |
|---|---|---|
attachments | [ChatMessageAttachment!]! | Listings, orders, livestreams, members, images and link previews, in the order they were attached. Empty when the message is deleted. Leaves out attachments the caller cannot see. |
author | User | The author's public profile. Null when the author's account is not visible. |
createdAt | DateTime! | When the message was posted. |
deletedAt | DateTime | When the author or a moderator deleted the message. A deleted message has text null, mentionedUsers empty and replyTo null. |
editedAt | DateTime | When the author last edited the message. Null when never edited. |
id | ID! | A globally unique ID. Treat this value as an opaque string. |
isSuspicious | Boolean! | True for another user's direct message whose author is shadow-banned or whose text has a spam phrase. False for deleted messages, channel messages and the caller's own messages. |
location | ChatMessageLocation! | Where the message was posted. |
mentionedUsers | [User!]! | Users mentioned in text, in token order. Empty when deleted. Leaves out users the caller cannot see. |
mentionsEveryone | Boolean! | True when the message mentions the whole channel. Always false for a direct message. |
reactions | [ChatMessageReactionSummary!]! | One entry per emoji on this message, ordered by each emoji's first reaction. Empty when the message is deleted. |
replyTo | ChatMessage | The message this one replies to. A deleted target has text null. Null when there is none, when the target is outside the channel's retention window, or when the caller cannot see it. |
text | String | Sanitised HTML as stored. The allowed tags are b, i, strong, em, a, p, span, table, tr, td, th, ul, li and ol. A mention is <span class="mention">@{userId}</span> and resolves through mentionedUsers. Null when deleted. |
viewer | ChatMessageViewerState | The authenticated user's relationship to this message, or null when unauthenticated. |
Returned by
AddChatMessageReactionSuccess.chatMessageChatChannelMessageEdge.nodeChatChannelViewerState.lastReadMessageChatMessage.replyToDeleteChatMessageItemSuccess.chatMessageDirectConversation.lastReadMessageDirectConversation.latestMessageDirectConversationMessageEdge.nodePostChatMessageSuccess.chatMessageRemoveChatMessageReactionSuccess.chatMessageReportChatMessageSuccess.chatMessageSendDirectMessageSuccess.chatMessage