justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 381 forks source link

emotes tag not present when receiving own PRIVMSG over the same WebSocket connection #613

Closed roberthartung closed 7 years ago

roberthartung commented 7 years ago

I created a websocket connection for chatting. But when I send a PRIVMSG I get this:

PRIVMSG #roberthartung :Kappa
@badges=broadcaster/1;color=#FF0000;display-name=RobertHartung;emote-sets=0,5245,6822;mod=0;subscriber=0;turbo=0;user-type= :tmi.twitch.tv USERSTATE #roberthartung

When looking at the actual chat WSS connection I see this:

@badges=broadcaster/1;color=#FF0000;display-name=RobertHartung;emotes=25:0-4;id=c9d74de5-7d5b-4ab2-bdc0-46bc243c2e43;mod=0;room-id=29723367;subscriber=0;turbo=0;user-id=29723367;user-type= :roberthartung!roberthartung@roberthartung.tmi.twitch.tv PRIVMSG #roberthartung :Kappa

When other users write messages, everything is fine!

3ventic commented 7 years ago

The server does not echo your own messages back to you; you only get a USERSTATE updating you on your status on the channel.

bashtech commented 7 years ago

Meaning you will either need to parse the emotes yourself using the emote-sets returned in USERSTATE or open two connection to the server, one for sending and one for receiving.

roberthartung commented 7 years ago

The server does not echo your own messages back to you; you only get a USERSTATE updating you on your status on the channel.

It does. But it doesnt include the emotes. Why doesn't it do that? Doesn't make any sense to me!

bashtech commented 7 years ago

It doesn't echo back the message. You see the message as you sent if over the socket and the USERSTATE which is sent each time you perform an action in the channel but isn't the actual message thus no emotes are included.

Sent: PRIVMSG #george :This is a test Kappa Received: @badges=moderator/1;color=#56A600;display-name=Ackbot;emote-sets=0,5,42,793;mod=1;subscriber=0;turbo=0;user-type=mod :tmi.twitch.tv USERSTATE #george

roberthartung commented 7 years ago

oooooh ... it says USERSTATE ... woow .. nvm then, thanks!