Merge branch 'chat-relation-constraints' into 'develop'
[akkoma] / lib / pleroma / notification.ex
index b952e81fac9bdd70c637b38dd38faf2ac3a20519..8868a910e3da89326eb6c589326d41c35d7e2274 100644 (file)
@@ -649,8 +649,8 @@ defmodule Pleroma.Notification do
     |> Repo.one()
   end
 
-  @spec mark_as_read(User.t(), Activity.t()) :: {integer(), nil | [term()]}
-  def mark_as_read(%User{id: id}, %Activity{data: %{"context" => context}}) do
+  @spec mark_context_as_read(User.t(), String.t()) :: {integer(), nil | [term()]}
+  def mark_context_as_read(%User{id: id}, context) do
     from(
       n in Notification,
       join: a in assoc(n, :activity),