diff --git a/CHANGELOG.md b/CHANGELOG.md index f7d4757f..98f795f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/bttv.manifest.json b/bttv.manifest.json index 000dcbd1..ac6245b6 100644 --- a/bttv.manifest.json +++ b/bttv.manifest.json @@ -1,4 +1,4 @@ { - "version": "0.40.3-beta", - "versionCode": "01208000332" + "version": "0.40.4-beta", + "versionCode": "01208000333" } diff --git a/mod/app/src/main/java/bttv/emote/Emote.java b/mod/app/src/main/java/bttv/emote/Emote.java index 3d5bc835..6503e02e 100644 --- a/mod/app/src/main/java/bttv/emote/Emote.java +++ b/mod/app/src/main/java/bttv/emote/Emote.java @@ -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