Skip to content

Notifications integration: create Notification entries & offline delivery #117

Description

@mehalyna

Task 6 — Notifications integration: create Notification entries & offline delivery

Title: notifications: create Notification records on incoming messages and wire offline delivery

Flow

  • When a message is created:

    • If recipient(s) connected on socket → message broadcast only.
    • If recipient(s) offline or not focused → enqueue job to create Notification DB record (Postgres) and optionally send email/push.
  • Worker behavior:

    • Batch email digests (configurable) or immediate emails (dev console).
    • Add notification rows with type='message', source_user, conversation_id, snippet.
  • Implement GET /api/notifications/ and PATCH /api/notifications/{id}/read/ if not present.

Acceptance

  • On message to offline user, notification row created and email enqueued (console backend in dev).
  • Tests: simulate offline recipient and assert Notification exists.

Dependencies

  • Notification model & worker infra (existing).
  • Task 3/4 message creation hooks.

Notes

  • Respect user notification preferences (if stored). Add opt-out flag to Notification preferences later.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions