X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fnotification.ex;h=5d29af8536a5b6d8409a87916b2aa58a1e9ab6c4;hb=8dc6a6b210e56ec1a175a3496466d1f8aa62f128;hp=f680fe049654871af27bf68fb87157f7dc7d1df5;hpb=c729883936c7d258cb670929af9577aec3e22851;p=akkoma diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index f680fe049..5d29af853 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -33,7 +33,7 @@ defmodule Pleroma.Notification do |> cast(attrs, [:seen]) end - def for_user_query(user, opts) do + def for_user_query(user, opts \\ []) do query = Notification |> where(user_id: ^user.id) @@ -67,7 +67,7 @@ defmodule Pleroma.Notification do |> join(:left, [n, a], tm in Pleroma.ThreadMute, on: tm.user_id == ^user.id and tm.context == fragment("?->>'context'", a.data) ) - |> where([n, a, o, tm], is_nil(tm.id)) + |> where([n, a, o, tm], is_nil(tm.user_id)) end end