cloudillo_push/lib.rs
1//! Push notification module
2//!
3//! Handles Web Push notifications for offline users.
4//!
5//! # Features
6//!
7//! - Push subscription management (register/unregister endpoints)
8//! - VAPID authentication (RFC 8292)
9//! - Web Push encryption (RFC 8188, 8291)
10//! - Per-user notification type settings
11//!
12//! # Settings
13//!
14//! Users can control which notification types they receive via settings:
15//! - `notify.push` - Master switch for all notifications
16//! - `notify.push.message` - Direct messages
17//! - `notify.push.connection` - Connection requests
18//! - `notify.push.file_share` - File shares
19//! - `notify.push.follow` - New followers
20//! - `notify.push.comment` - Comments on posts
21//! - `notify.push.reaction` - Reactions to posts
22//! - `notify.push.mention` - @mentions
23//! - `notify.push.post` - Posts from followed users
24
25#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
26#![forbid(unsafe_code)]
27
28pub mod handler;
29pub mod send;
30pub mod settings;
31
32mod prelude;
33
34pub use send::{send_notification, send_to_tenant, NotificationPayload, PushResult};
35
36use crate::prelude::*;
37
38pub fn register_settings(
39 registry: &mut cloudillo_core::settings::SettingsRegistry,
40) -> ClResult<()> {
41 settings::register_settings(registry)
42}
43
44// vim: ts=4