refetch user on incoming add/remove activity

if featured_address is nil
This commit is contained in:
Alexander Strizhakov 2021-03-03 18:04:06 +03:00
commit 3adb43cc20
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
4 changed files with 90 additions and 2 deletions

View file

@ -41,7 +41,7 @@ defmodule Pleroma.Factory do
urls =
if attrs[:local] == false do
base_domain = Enum.random(["domain1.com", "domain2.com", "domain3.com"])
base_domain = attrs[:domain] || Enum.random(["domain1.com", "domain2.com", "domain3.com"])
ap_id = "https://#{base_domain}/users/#{user.nickname}"
@ -60,6 +60,8 @@ defmodule Pleroma.Factory do
}
end
attrs = Map.delete(attrs, :domain)
user
|> Map.put(:raw_bio, user.bio)
|> Map.merge(urls)