Skip to content

Show Discord integration to Ultra subscribers; rename role to "Ultra"#385

Merged
simonhamp merged 2 commits into
mainfrom
discord-ultra-visibility
May 19, 2026
Merged

Show Discord integration to Ultra subscribers; rename role to "Ultra"#385
simonhamp merged 2 commits into
mainfrom
discord-ultra-visibility

Conversation

@simonhamp
Copy link
Copy Markdown
Member

@simonhamp simonhamp commented May 18, 2026

Summary

  • The Discord integration banner on the customer integrations page was gated behind hasMaxAccess(), which only covers perpetual Max licenses. Ultra subscribers (hasUltraAccess()) couldn't see or claim the role even though they qualify. This widens the gate across all five sites involved in the role lifecycle: the integrations page, the OAuth callback, AssignDiscordUltraRoleJob, the requestUltraRole() Livewire action, the discord:remove-expired-roles command, and the Stripe cancellation cleanup in StripeWebhookReceivedListener.
  • Renames the role end-to-end from "Max" to "Ultra" to match the new branding — config key (services.discord.max_role_idultra_role_id), env var (DISCORD_MAX_ROLE_IDDISCORD_ULTRA_ROLE_ID), DiscordApi methods (assignMaxRole/removeMaxRole/hasMaxRole…UltraRole), job class names, Livewire state and action, and all user-facing copy. The Discord role ID itself doesn't change — only the variable name and the role's display name (to be renamed in Discord manually).
  • Adds tests/Feature/DiscordUltraAccessTest.php covering banner visibility, role request happy/rejection paths, and the cleanup command's retain/remove behavior under the new rule.

Deployment note

The env var DISCORD_MAX_ROLE_ID must be renamed to DISCORD_ULTRA_ROLE_ID in any staging/production environment that has it set. The Discord role's display name should also be updated in the Discord server.

Test plan

  • php artisan test --compact tests/Feature/DiscordUltraAccessTest.php — 6 passed
  • php artisan test --compact tests/Feature/StripeWebhookRouteTest.php — 2 passed
  • vendor/bin/pint --dirty --format agent — clean
  • Manually verify an Ultra subscriber sees the Discord banner and can claim the role
  • Manually verify a free user does not see the Discord banner

🤖 Generated with Claude Code

simonhamp and others added 2 commits May 18, 2026 21:28
Widens the Discord role gate from `hasMaxAccess()` to also include
`hasUltraAccess()` so Ultra subscribers see the integration banner and
can claim the role. Renames the role end-to-end (config key, env var,
DiscordApi methods, jobs, Livewire state, user-facing copy) from "Max"
to "Ultra" to match the new branding.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	app/Http/Controllers/DiscordIntegrationController.php
#	app/Livewire/DiscordAccessBanner.php
#	app/Support/DiscordApi.php
#	config/services.php
#	resources/views/livewire/customer/integrations.blade.php
#	resources/views/livewire/discord-access-banner.blade.php
@simonhamp simonhamp marked this pull request as ready for review May 19, 2026 08:03
@simonhamp simonhamp merged commit 4ba6148 into main May 19, 2026
2 checks passed
@simonhamp simonhamp deleted the discord-ultra-visibility branch May 19, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant