diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-05-13 08:16:54 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-05-13 08:16:54 +0000 |
commit | 2d83efa5deeef249494f06c6a0f20cfe5791a8e3 (patch) | |
tree | 67fd0dd926cb180be8dc0f0d1d3e9c6860232c5e /lib | |
parent | 853f183fd3b8e782ef0f05e30a0b6b080d2a4ed0 (diff) | |
parent | 89603eda9ea51c5bd3c681fce958a4a6b446debe (diff) | |
download | pleroma-2d83efa5deeef249494f06c6a0f20cfe5791a8e3.tar.gz |
Merge branch 'no-self-notification' into 'develop'
Do not create notification for yourself
Closes #121
See merge request pleroma/pleroma!148
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/notification.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index e26e49c8c..e0dcd9823 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -91,7 +91,8 @@ defmodule Pleroma.Notification do # TODO move to sql, too. def create_notification(%Activity{} = activity, %User{} = user) do - unless User.blocks?(user, %{ap_id: activity.data["actor"]}) do + unless User.blocks?(user, %{ap_id: activity.data["actor"]}) or + user.ap_id == activity.data["actor"] do notification = %Notification{user_id: user.id, activity: activity} {:ok, notification} = Repo.insert(notification) Pleroma.Web.Streamer.stream("user", notification) |