X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fnotification.ex;h=e47145601e8cbd3d57af9eccc1d0c6dad409914e;hb=df2f7b39dd4e4879976fb40b67fa3087e828a6ce;hp=4659e14ef8bd667f50d4b06ea3757b6d4d1f73d3;hpb=9274cabe01977a3c2d35059d7889c63e2bd54de1;p=akkoma diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 4659e14ef..e47145601 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -10,8 +10,8 @@ defmodule Pleroma.Notification do schema "notifications" do field(:seen, :boolean, default: false) - belongs_to(:user, Pleroma.User) - belongs_to(:activity, Pleroma.Activity) + belongs_to(:user, User, type: Pleroma.FlakeId) + belongs_to(:activity, Activity, type: Pleroma.FlakeId) timestamps() end @@ -97,7 +97,7 @@ defmodule Pleroma.Notification do end end - def create_notifications(%Activity{id: _, data: %{"to" => _, "type" => type}} = activity) + def create_notifications(%Activity{data: %{"to" => _, "type" => type}} = activity) when type in ["Create", "Like", "Announce", "Follow"] do users = get_notified_from_activity(activity)