Only notify for mention if it is not in a comment

To avoid two similar notifications
This commit is contained in:
Bat
2018-09-08 12:52:27 +01:00
parent b53a078b49
commit 0f5f9101b6
4 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -372,7 +372,7 @@ impl FromActivity<Article, PgConnection> for Post {
if let Some(serde_json::Value::Array(tags)) = article.object_props.tag.clone() {
for tag in tags.into_iter() {
serde_json::from_value::<link::Mention>(tag.clone())
.map(|m| Mention::from_activity(conn, m, post.id, true))
.map(|m| Mention::from_activity(conn, m, post.id, true, true))
.ok();
serde_json::from_value::<Hashtag>(tag.clone())