Add support to "only notifications from following" setting

Testing
-------

PASS

Devices: Mix of iPhone simulators and real devices
notepush: This commit
Damus: 4ea6c360e6e33747cb09ecf085049948ec1dadd1 (WIP change from GH issue #2360)
Setup:
  - Account A with push notifications enabled, DM notifications enabled,
    and "only notifications from following enabled"
  - Account A follows B but not C
Steps:
1. Send DM to A from B. Push notification appears
2. Send DM to A from C. Push notification does not appear

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Closes: https://github.com/damus-io/damus/issues/2360
This commit is contained in:
Daniel D’Aquino
2024-08-04 11:47:47 -07:00
parent c51f37e6ea
commit 3ca3a83257
3 changed files with 75 additions and 10 deletions

View File

@ -1,7 +1,7 @@
pub mod mute_manager;
pub mod nostr_network_helper;
mod nostr_event_extensions;
pub mod notification_manager;
pub use mute_manager::MuteManager;
pub use nostr_network_helper::NostrNetworkHelper;
use nostr_event_extensions::{ExtendedEvent, SqlStringConvertible};
pub use notification_manager::NotificationManager;