Class ChatMessage
A normal chat message.
Inheritance
Namespace: TehGM.Wolfringo.Messages
Assembly: Wolfringo.Core.dll
Syntax
[ResponseType(typeof(ChatResponse))]
public class ChatMessage : IChatMessage, IWolfMessage, IRawDataMessage, IChatEmbedContainer
Remarks
Uses ChatResponse as response type.
Constructors
| Improve this Doc View SourceChatMessage()
Creates a message instance.
Declaration
protected ChatMessage()
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceChatMessage(UInt32, Boolean, String, IEnumerable<Byte>)
Creates a message instance.
Declaration
public ChatMessage(uint recipientID, bool groupMessage, string type, IEnumerable<byte> data)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | recipientID | User or group ID to send the message to. |
| System.Boolean | groupMessage | Is recipient a group? |
| System.String | type | Mime type of the message. |
| System.Collections.Generic.IEnumerable<System.Byte> | data | Raw byte data of the message. |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceChatMessage(UInt32, Boolean, String, IEnumerable<Byte>, ChatMessageFormatting)
Creates a message instance.
Declaration
public ChatMessage(uint recipientID, bool groupMessage, string type, IEnumerable<byte> data, ChatMessageFormatting formattingMetadata)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | recipientID | User or group ID to send the message to. |
| System.Boolean | groupMessage | Is recipient a group? |
| System.String | type | Mime type of the message. |
| System.Collections.Generic.IEnumerable<System.Byte> | data | Raw byte data of the message. |
| ChatMessageFormatting | formattingMetadata | Metadata for message formatting, such as group links. |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceChatMessage(UInt32, Boolean, String, IEnumerable<Byte>, ChatMessageFormatting, IEnumerable<IChatEmbed>)
Creates a message instance.
Declaration
public ChatMessage(uint recipientID, bool groupMessage, string type, IEnumerable<byte> data, ChatMessageFormatting formattingMetadata, IEnumerable<IChatEmbed> embeds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | recipientID | User or group ID to send the message to. |
| System.Boolean | groupMessage | Is recipient a group? |
| System.String | type | Mime type of the message. |
| System.Collections.Generic.IEnumerable<System.Byte> | data | Raw byte data of the message. |
| ChatMessageFormatting | formattingMetadata | Metadata for message formatting, such as group links. |
| System.Collections.Generic.IEnumerable<IChatEmbed> | embeds | Visual embeds attached to this chat message. |
Remarks
Uses ChatResponse as response type.
See Also
Properties
| Improve this Doc View SourceEditInfo
Information about message's latest edit.
Declaration
public ChatMessage.EditMetadata? EditInfo { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<ChatMessage.EditMetadata> |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceEmbeds
Visual embeds attached to this chat message.
Declaration
public IEnumerable<IChatEmbed> Embeds { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<IChatEmbed> |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceEventName
Message event name.
Declaration
public string EventName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Equals to MessageSend.
See Also
| Improve this Doc View SourceFlightID
WOLF protocol internal flight ID.
Declaration
public string FlightID { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceFormattingMetadata
The metadata for formatting of links in the message text.
Declaration
public ChatMessageFormatting FormattingMetadata { get; }
Property Value
| Type | Description |
|---|---|
| ChatMessageFormatting |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceHasTips
Is this message tipped?
Declaration
public bool HasTips { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceID
Unique ID of the message.
Declaration
public Guid? ID { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Guid> |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceIsDeleted
Is this message soft-deleted by group admin?
Declaration
public bool IsDeleted { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceIsGroupMessage
Is it a group message?
Declaration
public bool IsGroupMessage { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceIsImage
Is it an image message?
Declaration
public bool IsImage { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceIsPrivateMessage
Is it a private message?
Declaration
public bool IsPrivateMessage { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceIsText
Is it a text message?
Declaration
public bool IsText { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceIsVoice
Is it a voice message?
Declaration
public bool IsVoice { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceMimeType
Type of the message.
Declaration
public string MimeType { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceRawData
Message's raw binary data.
Declaration
public IReadOnlyCollection<byte> RawData { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<System.Byte> |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceRecipientID
User or group that received the message.
Declaration
public uint RecipientID { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceSenderID
User that sent the message.
Declaration
public uint? SenderID { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.UInt32> |
Remarks
When creating a new chat message, this value will be null.
For received messages, this value will be populated normally.
See Also
| Improve this Doc View SourceText
Message's text.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Uses ChatResponse as response type.
See Also
| Improve this Doc View SourceTimestamp
Message's timestamp.
Declaration
public WolfTimestamp? Timestamp { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<WolfTimestamp> |
Remarks
When creating a new chat message, this value will be null. Once WOLF server acknowledges the message, it'll respond with timestamp value. Default WolfClient implementation will automatically populate this value once this happens, so message will have timestamp populated after SendAsync<TResponse>(IWolfMessage, CancellationToken) returns.
For received messages, this value will be populated normally.