Table of Contents

Class DataMessage

Namespace
Signal.Domain.Messaging
Assembly
Signal.Domain.dll

The content of a regular (data) message: text, attachments, reactions, quotes and group context.

public sealed record DataMessage : IEquatable<DataMessage>
Inheritance
DataMessage
Implements
Inherited Members

Constructors

DataMessage(long, string?)

The content of a regular (data) message: text, attachments, reactions, quotes and group context.

public DataMessage(long Timestamp, string? Text)

Parameters

Timestamp long

The message timestamp (Unix milliseconds). Together with the author it identifies the message for reactions, quotes, edits and receipts.

Text string

The message body, if any.

Properties

Attachments

Attachments of the message.

public IReadOnlyList<Attachment> Attachments { get; init; }

Property Value

IReadOnlyList<Attachment>

Group

The group the message was sent in, or null for direct messages.

public GroupId? Group { get; init; }

Property Value

GroupId?

GroupName

The group's current name, if the message belongs to a group and the name is known.

public string? GroupName { get; init; }

Property Value

string

GroupRevision

The group's revision as of this message, if reported; it increases with every change to the group.

public int? GroupRevision { get; init; }

Property Value

int?

HasContent

Whether the message carries text, at least one attachment, or a sticker.

public bool HasContent { get; }

Property Value

bool

IsGroupUpdate

Whether this message only announces a group change (name, members, settings).

public bool IsGroupUpdate { get; init; }

Property Value

bool

Mentions

Users mentioned in Text.

public IReadOnlyList<Mention> Mentions { get; init; }

Property Value

IReadOnlyList<Mention>

Quote

The message this message replies to, if any.

public Quote? Quote { get; init; }

Property Value

Quote

Reaction

Set when the message is a reaction instead of regular content.

public Reaction? Reaction { get; init; }

Property Value

Reaction

RemoteDelete

Set when the message deletes an earlier message for everyone instead of carrying content.

public RemoteDelete? RemoteDelete { get; init; }

Property Value

RemoteDelete

Sticker

The sticker sent with the message, if any.

public Sticker? Sticker { get; init; }

Property Value

Sticker?

Text

The message body, if any.

public string? Text { get; init; }

Property Value

string

TextStyles

Styled ranges of Text (bold, italic, spoiler, …), as the sender formatted them.

public IReadOnlyList<StyledRange> TextStyles { get; init; }

Property Value

IReadOnlyList<StyledRange>

Timestamp

The message timestamp (Unix milliseconds). Together with the author it identifies the message for reactions, quotes, edits and receipts.

public long Timestamp { get; init; }

Property Value

long

ViewOnce

Whether the message is a view-once message.

public bool ViewOnce { get; init; }

Property Value

bool