Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emote payload should give the text without the user mention. #191

Open
raf924 opened this issue Jan 19, 2023 · 4 comments
Open

Emote payload should give the text without the user mention. #191

raf924 opened this issue Jan 19, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@raf924
Copy link

raf924 commented Jan 19, 2023

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.

@marzavec marzavec added the enhancement New feature or request label Jan 20, 2023
@marzavec
Copy link
Member

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.

@raf924
Copy link
Author

raf924 commented Jan 20, 2023

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?

@marzavec
Copy link
Member

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.

@raf924
Copy link
Author

raf924 commented Jan 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants