Compare commits

...

3 Commits

Author SHA1 Message Date
b8ba17b33f Fix patreon role check (again again) 2026-01-16 15:18:29 +00:00
5a8dd12cb8 Fix patreon role check (again)
Life without typecast is hard
2026-01-16 15:11:28 +00:00
3a77c4320d Fix patreon role check
We compare the roles using a strict type check, the json contents from the discord api are strings and not integers.
2026-01-16 14:42:39 +00:00
3 changed files with 10 additions and 8 deletions

View File

@@ -120,7 +120,8 @@ class DiscordAuthController extends Controller
}
// Only update if something actually changed
if ($user->is_patreon !== $isPatreon) {
$isPatreonOld = (bool) $user->is_patreon;
if ($isPatreonOld !== $isPatreon) {
$user->update([
'is_patreon' => $isPatreon,
]);

View File

@@ -25,6 +25,7 @@ class User extends Authenticatable
'email',
'password',
'locale',
'is_patreon',
'is_banned',
// Discord
'discord_id',

View File

@@ -6,13 +6,13 @@ return [
'guild_id' => 802233383710228550,
'patreon_roles' => [
841798154999169054, // ????
803329707650187364, // Tier-5
803327903659196416, // ????
803325441942356059, // Tier-3
803322725576736858, // Tier-2
802270568912519198, // Tier-1
802234830384267315 // admin
'841798154999169054', // ????
'803329707650187364', // Tier-5
'803327903659196416', // ????
'803325441942356059', // Tier-3
'803322725576736858', // Tier-2
'802270568912519198', // Tier-1
'802234830384267315' // admin
],
'discord_bot_token' => env('DISCORD_BOT_TOKEN'),