aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/notification.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/notification.ex')
-rw-r--r--lib/pleroma/notification.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex
index 039cc7312..65e3265d4 100644
--- a/lib/pleroma/notification.ex
+++ b/lib/pleroma/notification.ex
@@ -78,8 +78,9 @@ 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
- notification = %Notification{user_id: user.id, activity_id: activity.id}
+ notification = %Notification{user_id: user.id, activity: activity}
{:ok, notification} = Repo.insert(notification)
+ Pleroma.Web.Streamer.stream("user", notification)
notification
end
end