FIX(notifications): action_code accepts dots, PushMessage.stats actually updates #4

Merged
Ghasemi merged 1 commit from feature/notification-actions into master 2026-09-01 08:38:17 -04:00
Collaborator

Found by an end-to-end run against a live Gotify container:

  • action_code / NotificationLink.action_code were SlugField, which rejects
    dots. Every documented action_code (billboard.approved, escrow.timeout,
    ...) is dotted, so any real request using the catalog got a 400 before
    this fix -- only click_url ever worked. Switched both to CharField with
    a validator that keeps slug's charset but allows ".".
  • send_push_notification set push_message.state instead of .stats after a
    successful send, so PushMessage.stats stayed stuck at INIT forever
    regardless of delivery outcome. Fixed the attribute name and scoped the
    save with update_fields.

Verified live: POST with a dotted action_code now resolves through
NotificationLink and lands in Gotify with the correct click.url, and the
PushMessage row flips to DONE.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Found by an end-to-end run against a live Gotify container: - action_code / NotificationLink.action_code were SlugField, which rejects dots. Every documented action_code (billboard.approved, escrow.timeout, ...) is dotted, so any real request using the catalog got a 400 before this fix -- only click_url ever worked. Switched both to CharField with a validator that keeps slug's charset but allows ".". - send_push_notification set push_message.state instead of .stats after a successful send, so PushMessage.stats stayed stuck at INIT forever regardless of delivery outcome. Fixed the attribute name and scoped the save with update_fields. Verified live: POST with a dotted action_code now resolves through NotificationLink and lands in Gotify with the correct click.url, and the PushMessage row flips to DONE. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ali added 1 commit 2026-09-01 08:30:05 -04:00
Found by an end-to-end run against a live Gotify container:

- action_code / NotificationLink.action_code were SlugField, which rejects
  dots. Every documented action_code (billboard.approved, escrow.timeout,
  ...) is dotted, so any real request using the catalog got a 400 before
  this fix -- only click_url ever worked. Switched both to CharField with
  a validator that keeps slug's charset but allows ".".
- send_push_notification set push_message.state instead of .stats after a
  successful send, so PushMessage.stats stayed stuck at INIT forever
  regardless of delivery outcome. Fixed the attribute name and scoped the
  save with update_fields.

Verified live: POST with a dotted action_code now resolves through
NotificationLink and lands in Gotify with the correct click.url, and the
PushMessage row flips to DONE.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ghasemi merged commit 28cec7c5cd into master 2026-09-01 08:38:17 -04:00
Ghasemi deleted branch feature/notification-actions 2026-09-01 08:38:17 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: addwin/notifications#4
No description provided.