Skip to content

Commit

Permalink
fix notification with empty display name
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Aug 3, 2022
1 parent 7ace057 commit e993300
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ private static void GetStreamNotifications(Map<String, StreamObj> oldLive, JsonA
user_id = obj.get("user_id").getAsString();//Channel id

display_name = !obj.get("user_name").isJsonNull() ? obj.get("user_name").getAsString() : null;
//When stream comes online for the first time the display name may be and empty string
if (display_name.isEmpty()) {
display_name = !obj.get("user_login").isJsonNull() ? obj.get("user_login").getAsString() : null;
}

if (display_name != null) {

Expand Down

0 comments on commit e993300

Please sign in to comment.