Skip to content

Commit

Permalink
Fix missing username detection in IsOnline
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jan 17, 2025
1 parent 9d85e38 commit b3fe17a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libauth/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ func IsOnline(host *UrlProvider, acID string) (online bool, err error, username
if valid && res == "ok" {
online = true
logger.Debugf("User is online\n")
return
}

res, valid = infoResp["user_name"].(string)
if valid {
username = res
logger.Debugf("User name is \"%s\"\n", username)
}

return
Expand Down

0 comments on commit b3fe17a

Please sign in to comment.