Skip to content

Commit

Permalink
twitchlogin: Merge rather than appending
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Nov 6, 2024
1 parent fe5a35a commit e4eabd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/http/twitchlogin.pike
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ __async__ mapping(string:mixed) http_request(Protocols.HTTP.Server.Request req)
//Check if these credentials are at least what we already had.
mapping tok = G->G->user_credentials[(int)user->id] || ([]);
array missing = (tok->scopes || ({ })) - (req->variables->scope / " ") - ({""});
if (sizeof(missing)) {werror("LOGIN FAIL: %O %O %O\n", tok->scopes, req->variables->scope, (tok->scopes + missing) * " "); return render_template(#"# Twitch Login
if (sizeof(missing)) {werror("LOGIN FAIL: %O %O %O\n", tok->scopes, req->variables->scope, (tok->scopes | missing) * " "); return render_template(#"# Twitch Login
Hey, sorry, something seems to be messed up. Rosuav is looking into it. For now, you may
be able to get logged in by clicking this button:
[Try again](:.twitchlogin data-scopes=@$$scopes$$@)
", (["scopes": (tok->scopes + missing) * " "]));}
", (["scopes": (tok->scopes | missing) * " "]));}
G->G->DB->save_user_credentials(([
"userid": (int)user->id,
"login": user->login,
Expand Down

0 comments on commit e4eabd4

Please sign in to comment.