forked from AkkomaGang/akkoma
activitypub transmogrifier: learn locked state in Update messages
This commit is contained in:
parent
0a0c6bf394
commit
a003bdc30a
1 changed files with 2 additions and 1 deletions
|
@ -252,11 +252,12 @@ def handle_incoming(
|
||||||
{:ok, new_user_data} = ActivityPub.user_data_from_user_object(object)
|
{:ok, new_user_data} = ActivityPub.user_data_from_user_object(object)
|
||||||
|
|
||||||
banner = new_user_data[:info]["banner"]
|
banner = new_user_data[:info]["banner"]
|
||||||
|
locked = new_user_data[:info]["manuallyApprovesFollowers"] || false
|
||||||
|
|
||||||
update_data =
|
update_data =
|
||||||
new_user_data
|
new_user_data
|
||||||
|> Map.take([:name, :bio, :avatar])
|
|> Map.take([:name, :bio, :avatar])
|
||||||
|> Map.put(:info, Map.merge(actor.info, %{"banner" => banner}))
|
|> Map.put(:info, Map.merge(actor.info, %{"banner" => banner, "locked" => locked}))
|
||||||
|
|
||||||
actor
|
actor
|
||||||
|> User.upgrade_changeset(update_data)
|
|> User.upgrade_changeset(update_data)
|
||||||
|
|
Loading…
Reference in a new issue