Skip to content

Commit

Permalink
Extend ebs bans to opaque user id
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero committed Jun 12, 2024
1 parent 8c41c10 commit d2bebdd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ebs/src/modules/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ app.post("/public/prepurchase", async (req, res) => {
res.status(403).send("You are banned from using this extension.");
return;
}

if (await isUserBanned(req.twitchAuthorization!.opaque_user_id!)) {
res.status(403).send("You are banned from using this extension.");
return;
}

if (!connection.isConnected()) {
res.status(502).send("Game connection is not available");
return;
Expand Down Expand Up @@ -325,4 +331,4 @@ async function getTwitchUser(id: string): Promise<TwitchUser | null> {
displayName: user.displayName,
login: user.name,
}
}
}

0 comments on commit d2bebdd

Please sign in to comment.