This commit improves the robustness of mute list handling:
1. It listens to new mute lists from the relay interface, and saves them whenever there is a new one
2. It uses the user's own relay lists to fetch events (such as mute lists), helping to ensure we get their mute lists even when they are not stored in the Damus relay
3. It saves events it sees when fetching them from the network, if applicable
Changelog-Changed: Improved robustness of mute handling
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit implements basic push notification preferences as well as
the interface to change them.
Furthermore, the API interface was reworked to follow better REST API
conventions.
Testing
--------
PASS
Device: iPhone 15 simulators
iOS: 17.5
Damus: 4ea6c360e6e33747cb09ecf085049948ec1dadd1 (A commit from GH issue #2360)
notepush: This commit
Steps:
1. Disable all types of notifications, except for DMs.
2. Send a like to this user's post. Push notification should not appear. PASS
3. Send a DM to this user's post. Push notification should appear. PASS
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit brings a compilable, runnable relay draft, with logging
setup, basic README instructions, Mutex protection around shared
resources, implemented with code safety in mind
Notes:
- This is not fully tested
- The mutex design is not the most efficient, and could cause some contention on high traffic
- The REST API is not yet integrated