How Meetily's Notification System Respects User Preferences: A Technical Deep Dive

Meetily's notification system enforces user consent through a multi-layered Rust architecture that verifies consent flags, checks Do-Not-Disturb settings, and applies granular notification type controls before dispatching any alert.

Meetily is an open-source meeting assistant built with Tauri and Rust that prioritizes user privacy and control. Its notification subsystem, located in frontend/src-tauri/src/notifications/, implements a comprehensive preference enforcement mechanism to ensure users receive only the alerts they've explicitly authorized. This article examines how the notification system respects user preferences through the ConsentManager, NotificationSettings, and SystemHandler components according to the Zackriya-Solutions/meetily source code.

Core Components of the Preference System

NotificationSettings and ConsentManager

The NotificationSettings struct defined in frontend/src-tauri/src/notifications/settings.rs encapsulates all user-configurable options. This includes boolean flags for respect_do_not_disturb and manual_dnd_mode, alongside a nested NotificationPreferences struct that controls specific alert types like recording notifications and meeting reminders.

The ConsentManager struct in the same file handles persistence, reading from and writing to a notifications.json file. It exposes helper methods including has_consent(), has_system_permission(), and set_dnd_mode() that the system queries before displaying any notification. According to the source code, methods like set_dnd_mode() read and write the JSON file while logging actions for transparency.

SystemHandler and NotificationManager

The SystemHandler in frontend/src-tauri/src/notifications/system.rs implements the low-level logic for respecting user preferences. Its is_dnd_active() method (line 51) checks both OS-level Do-Not-Disturb status and the user's manual DND flag. The should_respect_dnd() function (lines 84-85) filters notifications based on priority, ensuring that only non-critical notifications are suppressed when DND is active.

The NotificationManager in manager.rs serves as the central orchestrator. Before calling the system notification plugin, it verifies consent through ConsentManager and checks DND status via SystemHandler, short-circuiting the request if preferences prohibit the alert. The command layer in frontend/src-tauri/src/lib.rs exposes Tauri commands like show_notification and is_dnd_active that the frontend UI invokes.

How the Notification System Respects User Preferences

Before any notification renders, the system calls ConsentManager::has_consent() and ConsentManager::has_system_permission() to verify the user has granted both application-level consent and system-level notification permissions. These flags are persisted to disk and checked on every notification request, ensuring revoked permissions are respected immediately without requiring an application restart.

2. Do-Not-Disturb Handling

The DND logic operates at two levels. First, SystemHandler::is_dnd_active() checks both the OS DND state and the manual_dnd_mode flag from NotificationSettings. Then, should_respect_dnd() evaluates the notification's priority—only non-critical notifications are suppressed when DND is active, ensuring urgent alerts still reach the user while respecting the user's desire for minimal interruptions.

3. Granular Notification Type Controls

Each notification type has a corresponding boolean flag in the NotificationPreferences struct. The manager checks settings.notification_preferences.show_recording_started (and similar flags) before constructing the notification object. If the specific type is disabled, the notification is silently discarded without reaching the system layer. The system also respects notification_sound toggles and meeting_reminder_minutes timing configurations, allowing users to disable sounds or adjust reminder lead times.

4. Persistence and Runtime Updates

All preference changes are written to notifications.json via ConsentManager::save_settings(). The system reloads these settings on each notification request, ensuring real-time respect for modifications made through the UI. This guarantees that disabling a notification type or enabling DND takes effect immediately.

Implementation Examples

The following Rust examples demonstrate how the notification system respects user preferences in practice.

To conditionally show a recording notification based on user preferences:

async fn maybe_show_recording_started(manager: &NotificationManager) -> Result<()> {
    // Load current preferences from disk
    let settings = manager.consent_manager.load_settings().await?;
    
    // Check both specific preference and global consent
    if settings.notification_preferences.show_recording_started && settings.consent_given {
        let notification = Notification::new(
            "Recording Started",
            "Your meeting is now being captured.",
            NotificationType::Info,
        );
        manager.show_notification(notification).await?;
    }
    Ok(())
}

To programmatically enable manual Do-Not-Disturb mode:

async fn enable_manual_dnd(manager: &NotificationManager) -> Result<()> {
    // Sets manual_dnd_mode and respects the respect_do_not_disturb flag
    manager
        .consent_manager
        .set_dnd_mode(true)
        .await?;
    Ok(())
}

Summary

  • Meetily's notification system uses a three-tier architecture: NotificationSettings for configuration, ConsentManager for persistence, and SystemHandler for enforcement.
  • All notifications require explicit user consent verified through has_consent() and system permissions checked via has_system_permission() before display.
  • Do-Not-Disturb logic respects both OS-level states and manual user overrides, with priority-based filtering in should_respect_dnd() to ensure critical alerts bypass DND.
  • Granular controls in NotificationPreferences allow users to disable specific notification types (like recording alerts or meeting reminders) while keeping others enabled.
  • Preferences are persisted to notifications.json and reloaded on every request, ensuring real-time updates without application restarts.

Frequently Asked Questions

How does Meetily handle Do-Not-Disturb mode?

Meetily checks both the operating system's DND status and an application-specific manual_dnd_mode flag through the SystemHandler::is_dnd_active() method. The should_respect_dnd() function then filters non-critical notifications, ensuring only high-priority alerts bypass DND settings while routine notifications are suppressed.

Where are notification preferences stored?

User preferences are serialized to a notifications.json file on disk through the ConsentManager struct in frontend/src-tauri/src/notifications/settings.rs. This file stores consent flags, DND settings, and the NotificationPreferences struct containing individual notification type toggles.

Can users disable specific notification types while keeping others enabled?

Yes. The NotificationPreferences struct contains boolean flags for specific notification types such as show_recording_started. The NotificationManager checks these individual flags before dispatching, allowing users to disable recording alerts while keeping meeting reminders active, with each preference persisted independently.

The system calls ConsentManager::has_consent() to verify application-level permission and has_system_permission() to confirm OS-level notification rights. Both checks must pass in manager.rs before the notification reaches the SystemHandler for display, ensuring no alert appears without explicit authorization.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →