Skip to content

fix: broadcast WebSocket invalidation on all Message creation paths - #182

Merged
Novanglus96 merged 1 commit into
alphafrom
fix/message-websocket-broadcast
May 28, 2026
Merged

fix: broadcast WebSocket invalidation on all Message creation paths#182
Novanglus96 merged 1 commit into
alphafrom
fix/message-websocket-broadcast

Conversation

@Novanglus96

Copy link
Copy Markdown
Owner

Summary

  • Adds a post_save signal on the Message model in administration/signals.py
  • Signal calls broadcast_invalidate(["messages"]) with the correct group (user_<pk> for user-scoped messages, global for broadcast messages)
  • Wires the signal in AdministrationConfig.ready() so it loads on app startup
  • Previously, WebSocket invalidation was only triggered via transactions/tasks.py's create_message() helper — messages created via Django shell, admin, or any other path did not push updates to the frontend

Test plan

  • Create a Message via Django admin or shell — it should appear in the inbox immediately without a page refresh
  • Create a user-scoped Message — only that user's inbox should update
  • Create a global Message (user=None) — all connected clients should receive the invalidation

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Novanglus96
Novanglus96 merged commit 7623fec into alpha May 28, 2026
2 checks passed
@Novanglus96
Novanglus96 deleted the fix/message-websocket-broadcast branch May 28, 2026 18:37
@Novanglus96

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.6.1-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Novanglus96

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant