Skip to content

Commit

Permalink
Use emote set item's name (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
FoseFx authored Nov 6, 2023
1 parent b15f86d commit 600649f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

# 0.40.4-beta
- fix issue related to 7TV emote names

# 0.40.3-beta
- fix issue for 7TV Emotes without owner

Expand Down
4 changes: 2 additions & 2 deletions bttv.manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "0.40.3-beta",
"versionCode": "01208000332"
"version": "0.40.4-beta",
"versionCode": "01208000333"
}
5 changes: 4 additions & 1 deletion mod/app/src/main/java/bttv/emote/Emote.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ public static Emote fromJson(JSONObject jsonObject, Emotes.Source source) throws
owner = jsonObject.getJSONObject("user").getString("displayName");
break;
case STV:
// note: this is the emote set item's name, which may differ from the emote name
// (from what I understand an emote can be added to a channel using a different name)
code = jsonObject.getString("name");

JSONObject data = jsonObject.getJSONObject("data");
code = data.getString("name");

JSONObject hostObj = data.getJSONObject("host");
StringBuilder urlBuilder = new StringBuilder("https:"); // for some godforsaken reason this part is missing
Expand Down

0 comments on commit 600649f

Please sign in to comment.