On this page

Message object

Message is an object that refers to a single message published on a chat channel.

Properties

The Message object has the following properties:

1public class Message : UniqueChatEntity {
2 public string Id { get; protected set; }
3 public string MessageText { get; }
4 public string OriginalMessageText { get; }
5 public string TimeToken { get; }
6 public string ChannelId { get; }
7 public string UserId { get; }
8 public Dictionary<string, object> Meta { get; }
9 public bool IsDeleted { get; }
10 public List<MentionedUser> MentionedUsers { get; }
11 public List<ReferencedChannel> ReferencedChannels { get; }
12 public List<TextLink> TextLinks { get; }
13 public List<MessageAction> MessageActions { get; }
14 public List<MessageAction> Reactions { get; }
15}
ParameterDescription
Id
Type: string
Unique identifier for the message which is a message timetoken.
MessageText
Type: string
Text content of the message. This is the main content sent by the user.
OriginalMessageText
Type: string
Original text content of the message, before any edits.
TimeToken
Type: string
A timestamp that helps order messages in a conversation.
ChannelId
Type: string
Unique identifier for the channel or group in which the message was sent.
UserId
Type: string
Unique ID of the user who sent the message. Do not confuse this with the username of the user.
Meta
Type: Dictionary<string, object>
Extra information added to the message giving additional context. This object can be of any type and can consist of a list of key-value pairs.
IsDeleted
Type: bool
Indicates whether the message has been deleted. If the message has been deleted, this property will be true.
MentionedUsers
Type: List<MentionedUser>
List of users mentioned in the message.
ReferencedChannels
Type: List<ReferencedChannel>
List of channels referenced in the message.
TextLinks
Type: List<TextLink>
List of links included in the message.
MessageActions
Type: List<MessageAction>
Any action associated with the message (like edited or deleted).
Reactions
Type: List<MessageAction>
All message reactions added to the message by other users.
icon

Message-related types

Events

The Message object has the following event:

1// Event triggered when a message is updated
2public event Action<Message> OnMessageUpdated;

Example

An event that is triggered when a message is updated by the server.

1

Methods

You can call the following methods on the Message object.

Click on each method for more details.

Use case

For example, you can use the Message object methods to:

Last updated on