fix /inbox for Relay
[akkoma] / lib / pleroma / notification.ex
index f680fe049654871af27bf68fb87157f7dc7d1df5..5d29af8536a5b6d8409a87916b2aa58a1e9ab6c4 100644 (file)
@@ -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