Emote payload should give the text without the user mention.
The text property of an emote payload should contain only the text inputted by the user. It is up to the client to construct a message from the payload.
This is a good point. The relevant line is here. This kind of a change would require either updating the old legacy client, or doing a check on the receiving clients to see if they are using the new v2 client. Both options kind of suck.
I'll leave this open until we make a change.
The change in legacy client seems simple no?
emote: function (args) {
args.nick = '*';
pushMessage(args);
},
emote: function (args) {
args.nick = '*';
args.text = `@${args.nick} ${args.text}`;
pushMessage(args);
},
right?
That would be the gist of it, yes. However, your example results in every message being @* did something 😛
There are still two other ramifications of simply updating the legacy client. Cached users will miss the name until their cache renews. Legacy bots may fail to parse the names correctly unless updated.
That would be the gist of it, yes. However, your example results in every message being
@* did something😛
Whoops well it's late
There are still two other ramifications of simply updating the legacy client. Cached users will miss the name until their cache renews. Legacy bots may fail to parse the names correctly unless updated.
Do legacy bots even parse emote? I'm only parsing it because I'm making a bridge rather than a bot. And if they have to update they'll update. And they'll be glad they don't have to do some string sorcery to get the actual emote.
For cached users well when they see that it doesn't work as it should they'll reset their cache.