Skip to content
Version 2.32.0
↓ Get the launcher

ChatMessage record

An incoming chat message delivered to plugins. MsgId is the server-assigned globally-unique id; plugins can use it to deduplicate when the same message arrives via multiple paths (live Notify + history Return). IsHistory is true for messages projected from the GetChipChatRecords reply that the server sends at login — plugins that react to live traffic (e.g. auto-reply, sound notifications) should skip history-replay messages by checking this flag.

public record ChatMessage
name description
ChatMessage(…) An incoming chat message delivered to plugins. MsgId is the server-assigned globally-unique id; plugins can use it to deduplicate when the same message arrives via multiple paths (live Notify + history Return). IsHistory is true for messages projected from the GetChipChatRecords reply that the server sends at login — plugins that react to live traffic (e.g. auto-reply, sound notifications) should skip history-replay messages by checking this flag.
Channel { get; set; }
IsHistory { get; set; }
MsgId { get; set; }
PeerId { get; set; } For a Whisper message, the charId of the OTHER party in the conversation — the key to group whispers per person. Equals TargetId when the local player sent it, otherwise SenderId; private-history batches are tagged from the history request’s peer. 0 when it can’t be decided (non-whisper, or the local charId isn’t known yet and the record carried a target) — then compare SenderId/TargetId against CharId yourself.
RawPayload { get; set; }
Sender { get; set; }
SenderId { get; set; }
SenderName { get; set; }
StickerId { get; set; } For a picture-emoji/sticker message (Emote), the sticker’s ChatStickersTable config id (= ChatPictureEmoji.config_id); 0 when the message is not a sticker. Resolve to an image with LoadStickerIcon.
SystemLabel { get; set; } For a client-generated SYSTEM notice (System, e.g. “Obtained Guild Fund×40”), the notice’s source label as the game shows it (e.g. “Obtained”; empty for plain message notices). Null on every server chat message. These notices never touch the network: the framework captures them from the game’s own chat VM, so they arrive with IsHistory = false, no sender, and a framework-made NEGATIVE MsgId (unique per session, not a server id). Text keeps the game’s rich-text tags (item-quality <color>) — render it as TMP rich text or strip them.
SystemRefId { get; set; } System notice reference id — the item config id for an item-gained notice (SystemType = 1), else the message/config id the game attached (0 when none). See SystemLabel.
SystemType { get; set; } System notice kind (the game’s E.ESystemTipInfoType: 1 = item gained, 2 = message, 3 = dungeon roll); 0 on server chat messages. See SystemLabel.
TargetId { get; set; } The raw ChatMsgInfo.target_id — for a whisper, the RECIPIENT’s charId (the same id SenderId uses); 0 when the wire record carried none (non-whisper channels).
Text { get; set; }
Timestamp { get; set; }
Type { get; set; }