• Mahmoud Aglan's avatar
    feat(notifications): scheduled campaigns are actually sent · 52d5591d
    Mahmoud Aglan authored
    Campaigns saved as 'scheduled' were never looked at again: nothing in either
    app processed them. CampaignService::processDue() sends every due campaign
    into the game's bell (notifications with title_ar/body_ar, as the game's
    notifications.php reads them) and records recipients, claiming each one with
    a conditional scheduled -> sending update so overlapping runs never send
    twice. It runs from GET/POST /api/cron/notifications (X-Service-Key, or
    X-Cron-Secret / ?secret= when CRON_SECRET is set, the same credentials as
    the game's api/cron.php) for a scheduler, and as a fallback at most once a
    minute after any staff page load.
    
    Scheduling now stores the typed Cairo time as UTC (the raw datetime-local
    value was saved as UTC, 2-3 hours late) and refuses past times; filters
    are stored as jsonb, not a JSON string; cancelling only cancels a campaign
    that has not started; send-now shares the same delivery code.
    Co-Authored-By: 's avatarClaude Opus 5.5 <noreply@anthropic.com>
    52d5591d
Name
Last commit
Last update
..
ApiProxy.php Loading commit data...
AuditLog.php Loading commit data...
Auth.php Loading commit data...
Database.php Loading commit data...
EconomyService.php Loading commit data...
OrgPermissions.php Loading commit data...
Pagination.php Loading commit data...
Response.php Loading commit data...
Router.php Loading commit data...
RuleEngine.php Loading commit data...
SupabaseStorage.php Loading commit data...
ThemeService.php Loading commit data...
Time.php Loading commit data...
Validator.php Loading commit data...
View.php Loading commit data...