Skip to content

ntfy_push_core: initial module commit#1811

Open
nurefexc wants to merge 23 commits intoOCA:17.0from
nurefexc:17.0
Open

ntfy_push_core: initial module commit#1811
nurefexc wants to merge 23 commits intoOCA:17.0from
nurefexc:17.0

Conversation

@nurefexc
Copy link

@nurefexc nurefexc commented Feb 7, 2026

PR Description for OCA/social

Module Name: ntfy_push_core

Summary

This PR introduces a new module to provide asynchronous push notifications for Odoo using the ntfy.sh protocol. It allows users to receive real-time Odoo notifications (messages, mentions, activities) directly on their mobile devices or desktops via the ntfy app or server.

Key Features

  • Asynchronous Queueing: Notifications are not sent directly during the write/create process. Instead, they are queued and processed via a dedicated Cron job to ensure Odoo's UI performance remains unaffected by network latency.
  • Secure Topic Generation: Each user gets a unique, secure topic URL generated using a SHA-224 hash based on the database UUID and user ID, preventing unauthorized access to notification streams.
  • Flexible Configuration: Supports both the official https://ntfy.sh server and self-hosted instances.
  • User-Friendly Setup: Users can easily switch their notification preference to "ntfy.sh" and instantly get their subscription URL with a QR-like link.
  • Deep Linking: Notifications include a click-through URL that takes the user directly to the relevant Odoo record.

Technical Notes

  • Inherits from mail.thread to hook into the message posting process.
  • Includes automated tests covering URL generation, user settings, and server consistency checks.
  • Fully compliant with OCA linting and formatting standards (Black, Ruff, Pylint).

Testing Instructions

  1. Install the module.
  2. Go to Settings > Technical > System Parameters and set ntfy.server_url (optional, defaults to ntfy.sh).
  3. Go to your User Profile > Preferences and set "Notification" to ntfy.sh.
  4. Copy the generated URL into your ntfy mobile app.
  5. Post a message on any document where you are a follower; you should receive a push notification via the cron job.

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