Class ChatMessage
A normal chat message.
Namespace: TehGM.Wolfringo.Messages
Assembly: Wolfringo.Core.dll
Syntax
[ResponseType(typeof(ChatResponse))]
public class ChatMessage : IChatMessage, IWolfMessage, IRawDataMessage, IChatEmbedContainer
Remarks
Uses Chat
Constructors
| Improve this Doc View SourceChatMessage()
Creates a message instance.
Declaration
[JsonConstructor]
protected ChatMessage()
ChatMessage(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. |
recipientID | User or group ID to send the message to. |
System. |
groupMessage | Is recipient a group? |
System. |
type | Mime type of the message. |
System. |
data | Raw byte data of the message. |
ChatMessage(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. |
recipientID | User or group ID to send the message to. |
System. |
groupMessage | Is recipient a group? |
System. |
type | Mime type of the message. |
System. |
data | Raw byte data of the message. |
Chat |
formattingMetadata | Metadata for message formatting, such as group links. |
ChatMessage(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. |
recipientID | User or group ID to send the message to. |
System. |
groupMessage | Is recipient a group? |
System. |
type | Mime type of the message. |
System. |
data | Raw byte data of the message. |
Chat |
formattingMetadata | Metadata for message formatting, such as group links. |
System. |
embeds | Visual embeds attached to this chat message. |
Properties
| Improve this Doc View SourceEditInfo
Information about message's latest edit.
Declaration
[JsonProperty("edited", NullValueHandling = NullValueHandling.Ignore)]
public ChatMessage.EditMetadata? EditInfo { get; }
Property Value
Type | Description |
---|---|
System. |
Embeds
Visual embeds attached to this chat message.
Declaration
[JsonProperty("embeds", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
public IEnumerable<IChatEmbed> Embeds { get; }
Property Value
Type | Description |
---|---|
System. |
EventName
Message event name.
Declaration
[JsonIgnore]
public string EventName { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
Equals to Message
FlightID
WOLF protocol internal flight ID.
Declaration
public string FlightID { get; }
Property Value
Type | Description |
---|---|
System. |
FormattingMetadata
The metadata for formatting of links in the message text.
Declaration
[JsonProperty("formatting", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
public ChatMessageFormatting FormattingMetadata { get; }
Property Value
Type | Description |
---|---|
Chat |
HasTips
Is this message tipped?
Declaration
[JsonProperty("isTipped", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
public bool HasTips { get; }
Property Value
Type | Description |
---|---|
System. |
ID
Unique ID of the message.
Declaration
public Guid? ID { get; }
Property Value
Type | Description |
---|---|
System. |
IsDeleted
Is this message soft-deleted by group admin?
Declaration
[JsonProperty("isDeleted", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
public bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
System. |
IsGroupMessage
Is it a group message?
Declaration
public bool IsGroupMessage { get; }
Property Value
Type | Description |
---|---|
System. |
IsImage
Is it an image message?
Declaration
[JsonIgnore]
public bool IsImage { get; }
Property Value
Type | Description |
---|---|
System. |
IsPrivateMessage
Is it a private message?
Declaration
[JsonIgnore]
public bool IsPrivateMessage { get; }
Property Value
Type | Description |
---|---|
System. |
IsText
Is it a text message?
Declaration
[JsonIgnore]
public bool IsText { get; }
Property Value
Type | Description |
---|---|
System. |
IsVoice
Is it a voice message?
Declaration
[JsonIgnore]
public bool IsVoice { get; }
Property Value
Type | Description |
---|---|
System. |
MimeType
Type of the message.
Declaration
public string MimeType { get; }
Property Value
Type | Description |
---|---|
System. |
RawData
Message's raw binary data.
Declaration
[JsonIgnore]
public IReadOnlyCollection<byte> RawData { get; }
Property Value
Type | Description |
---|---|
System. |
RecipientID
User or group that received the message.
Declaration
public uint RecipientID { get; }
Property Value
Type | Description |
---|---|
System. |
SenderID
User that sent the message.
Declaration
public uint? SenderID { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
When creating a new chat message, this value will be null.
For received messages, this value will be populated normally.
Text
Message's text.
Declaration
[JsonIgnore]
public string Text { get; }
Property Value
Type | Description |
---|---|
System. |
Timestamp
Message's timestamp.
Declaration
public WolfTimestamp? Timestamp { get; }
Property Value
Type | Description |
---|---|
System. |
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 Wolf
For received messages, this value will be populated normally.