mirror of
https://github.com/nostrlabs-io/notepush.git
synced 2025-06-18 12:47:12 +00:00
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
This commit is contained in:
@ -253,7 +253,7 @@ impl APIHandler {
|
||||
}
|
||||
|
||||
// Proceed with the main logic after passing all checks
|
||||
self.notification_manager.save_user_device_info(pubkey, device_token).await?;
|
||||
self.notification_manager.save_user_device_info_if_not_present(pubkey, device_token).await?;
|
||||
Ok(APIResponse {
|
||||
status: StatusCode::OK,
|
||||
body: json!({ "message": "User info saved successfully" }),
|
||||
|
Reference in New Issue
Block a user