Create mentions only for explicitly mentioned users

This commit is contained in:
Sergey Suprunenko 2019-07-10 13:29:50 +00:00 committed by kaniini
commit ff55e3c16f
4 changed files with 73 additions and 5 deletions

View file

@ -117,6 +117,7 @@ defmodule Pleroma.Factory do
def note_activity_factory(attrs \\ %{}) do
user = attrs[:user] || insert(:user)
note = attrs[:note] || insert(:note, user: user)
attrs = Map.drop(attrs, [:user, :note])
data = %{
"id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(),
@ -133,6 +134,7 @@ defmodule Pleroma.Factory do
actor: data["actor"],
recipients: data["to"]
}
|> Map.merge(attrs)
end
def article_activity_factory do