Commit Graph

6 Commits

Author SHA1 Message Date
63c5f7e723 fix clippy issues
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-11 10:48:54 -08:00
bfcc6e27e9 rustfmt
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-09 09:35:34 -08:00
abb3283eaa Do not override user info row on registration endpoint if it already exists
This commit fixes an issue where notification settings would be lost
after restarting Damus, causing unwanted notifications

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Closes: https://github.com/damus-io/damus/issues/2417
2024-09-04 14:25:07 -07:00
c51f37e6ea Push notification preferences
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>
2024-08-04 11:55:02 -07:00
73a7dc1e4a Reduce shared resource contention
This commit should drastically improve performance of the relay.

It reduces contention by removing the mutex on NotificationManager and
replacing it with several smaller mutexes for each shared resource, so
that more operations can happen concurrently.

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2024-08-02 17:32:44 -07:00
db088b1aa3 Unified API + Websockets server
Both API and Websockets are running on the same port

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2024-08-02 16:48:56 -07:00