Specific user account appends strange character every other message

The problem: My user account (144118594) appends a whitespace character (ASCII 32) followed by this character to every other message.

How I got here: I set up a Twitch websocket, and started listening for messages to trigger events. For example: if a user types the message ‘marco’, reply with ‘polo’. I noticed that ‘polo’ was only triggered every other message with using the Tazzlyn account in chat, but when other accounts typed ‘marco’, it would always respond ‘polo’.

A friend wanted to help solve this and set up a websocket on his own channel, using his own account, and went to his channel to test if the behavior is the same, and it is - every other message sent by the Tazzlyn account doesn’t trigger ‘polo’ because it’s appended with these characters. But all other accounts behave normally.

I did an ASCII dump of the word ‘test’ being typed twice and ended up with this:

4 chars
116 - t
101 - e
115 - s
116 - t

6 chars
116 - t
101 - e
115 - s
116 - t
32 ← appended character
847 ← appended character

After using an ASCII analyzer, I found that the last character was this one and the 847 seemed to be in reference to his HTML entity.

For the sake of moving forward with my project, I’m probably going to strip the 32 847 ASCII combination from any message containing it, but I found this to be such a strange outcome during debugging the issue that I wanted to post about it here and see if anyone had any thoughts or if there was any reason for this.

Thanks!

1 Like

As in the message you send has a whitespace on the end? (To clarify)

You are likely using 7tv (or another plugin) which appends blank characters on a whim to messages sent by users, to bypass the “you can’t repeat yourself in chat in a 30 second window to prevent spam” rule

Yeah, every other message would have a whitespace on the end, but also invisibly append the weird 847 character, which made the Javascipt .trim() method not work in removing whitespaces. It was pretty strange!

But you nailed it - 7TV was causing the issue. I’m running the BTTV, FrankerZ and 7TV extensions and turned them all on and off individually and when I disabled 7TV specifically, the issue went away. I’ll still be going with the method of hunting for and removing the whitespace + 847 character, as I know several people in chat use 7TV too.

Thanks so much for helping me solve this! I never would have thought that it could have been an extension and it makes a lot of sense as to why 7TV is doing that. I’ll definitely be keeping extensions in mind first if I run into any other strange chat behavior through the websocket.