Add follow notifications.

This commit is contained in:
Roger Braun 2017-09-11 20:53:11 +02:00
commit 464c33e9a1
2 changed files with 3 additions and 1 deletions

View file

@ -20,7 +20,7 @@ defmodule Pleroma.Notification do
Repo.all(query)
end
def create_notifications(%Activity{id: id, data: %{"to" => to, "type" => type}} = activity) when type in ["Create", "Like", "Announce"] do
def create_notifications(%Activity{id: id, data: %{"to" => to, "type" => type}} = activity) when type in ["Create", "Like", "Announce", "Follow"] do
users = User.get_notified_from_activity(activity)
notifications = Enum.map(users, fn (user) -> create_notification(activity, user) end)