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

MessageEmote: fixes emote replaced string with a hack until this can be re-written to something more sane, adds support for 7tv emotes #244

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

swiftyspiffy
Copy link
Member

Changes

  • adds support for 7tv emotes (joins bttv and ffz)
  • adds a hack that fixes the emote replaced string that's been broken for like 5 years
  • this was originally referenced in ChatMessage.EmoteReplacedMessage should be populated based on ChatMessage.EmoteSet #21 . the codebase for this feature is actually... quite complex. this hack changes the generated regex match string to require either space on one side or both sides, which is effectively the rules Twitch uses

Emote replaced string test cases

  • LUL DansGame "LUL"
https://static-cdn.jtvnw.net/emoticons/v1/425618/1.0 https://static-cdn.jtvnw.net/emoticons/v1/33/1.0 "LUL"
  • LUL DansGame "LUL" LUL LUL "LUL" "DansGame" WutFace "WutFace" MrDestructoid MrDestructoid
https://static-cdn.jtvnw.net/emoticons/v1/425618/1.0 https://static-cdn.jtvnw.net/emoticons/v1/33/1.0 "LUL" https://static-cdn.jtvnw.net/emoticons/v1/425618/1.0 https://static-cdn.jtvnw.net/emoticons/v1/425618/1.0  "LUL" "DansGame" https://static-cdn.jtvnw.net/emoticons/v1/28087/1.0  "WutFace" https://static-cdn.jtvnw.net/emoticons/v1/28/1.0  https://static-cdn.jtvnw.net/emoticons/v1/28/1.0 
  • LUL
https://static-cdn.jtvnw.net/emoticons/v1/425618/1.0

@swiftyspiffy swiftyspiffy merged commit 29157f1 into dev Aug 7, 2023
1 check passed
@Mahsaap Mahsaap deleted the fix_emote_replaced_string branch June 12, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants