Skip to content

Commit

Permalink
fix error on missing owner
Browse files Browse the repository at this point in the history
  • Loading branch information
FoseFx committed Nov 3, 2023
1 parent 3adeac0 commit b15f86d
Show file tree
Hide file tree
Showing 3 changed files with 10 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.3-beta
- fix issue for 7TV Emotes without owner

# 0.40.2-beta
- move to 7TV API v3
- remove support for 7TV badges
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.2-beta",
"versionCode": "01208000331"
"version": "0.40.3-beta",
"versionCode": "01208000332"
}
6 changes: 5 additions & 1 deletion mod/app/src/main/java/bttv/emote/Emote.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ public static Emote fromJson(JSONObject jsonObject, Emotes.Source source) throws
} else {
imageType = "png";
}
owner = data.getJSONObject("owner").getString("display_name");
if (data.has("owner")) {
owner = data.getJSONObject("owner").getString("display_name");
} else {
owner = null; // we don't get the owner
}
break;
default:
Log.w("LBTTVEmoteFromJson", "source unknown: " + source);
Expand Down

0 comments on commit b15f86d

Please sign in to comment.