Improve notification management (#561)

* Don't notify for comment when mentioned

fix #505

* Don't save notification for remote users

fix #472
This commit is contained in:
fdb-hiroshima
2019-05-04 17:15:41 +02:00
committed by GitHub
parent 918bda14ec
commit c9070930d2
6 changed files with 65 additions and 46 deletions
+2 -1
View File
@@ -62,7 +62,6 @@ pub fn create(
},
)
.expect("comments::create: insert error");
comm.notify(&*conn).expect("comments::create: notify error");
let new_comment = comm
.create_activity(&rockets)
.expect("comments::create: activity error");
@@ -80,6 +79,8 @@ pub fn create(
.expect("comments::create: mention save error");
}
comm.notify(&*conn).expect("comments::create: notify error");
// federate
let dest = User::one_by_instance(&*conn).expect("comments::create: dest error");
let user_clone = user.clone();