DinkPlugin
DinkPlugin copied to clipboard
include sender in chat notifier extra metadata
Checklist
- [X] I've searched the issues and pull requests for similar looking suggestions.
- [X] I've checked the
Unreleased
section of the changelog for newly added features that sound like my suggestion.
Describe your Suggestion
I would like to suggest including a "sender" property in the extra metadata of the chat notifier. This property would show the name of the player that sent the chat message, if any. The RuneLite API exposes this with ChatMessage.getName().
The JSON could look like this:
{
"type": "CHAT",
"content": "%USERNAME% received a chat message: `You've been playing for a while, consider taking a break from your screen.`",
"extra": {
"type": "GAMEMESSAGE",
"message": "You've been playing for a while, consider taking a break from your screen."
"sender": "sender rsn"
}
}
Not all chat messages have a sender, so this property would have to be conditionally included or fall back to null.
Reasoning
This property includes a lot more context of the nature of the chat message. It would allow for separating the messages that the player sent themselves from other chat messages.