Handle Hubzilla posts better
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
5e7bcc44df
commit
f7d064c022
|
@ -974,7 +974,7 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier do
|
||||||
# Conversation
|
# Conversation
|
||||||
object_data
|
object_data
|
||||||
|> Map.put(:creator_id, object_data.actor_id)
|
|> Map.put(:creator_id, object_data.actor_id)
|
||||||
|> Map.put(:actor_id, object_data.attributed_to_id)
|
|> Map.put(:actor_id, object_data.attributed_to_id || object_data.actor_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,8 @@ defmodule Mobilizon.Service.HTTP.ActivityPub do
|
||||||
[{"User-Agent", @user_agent}, {"Accept", "application/activity+json"}] ++ headers},
|
[{"User-Agent", @user_agent}, {"Accept", "application/activity+json"}] ++ headers},
|
||||||
Tesla.Middleware.FollowRedirects,
|
Tesla.Middleware.FollowRedirects,
|
||||||
{Tesla.Middleware.Timeout, timeout: 10_000},
|
{Tesla.Middleware.Timeout, timeout: 10_000},
|
||||||
{Tesla.Middleware.JSON, decode_content_types: ["application/activity+json"]}
|
{Tesla.Middleware.JSON,
|
||||||
|
decode_content_types: ["application/activity+json", "application/ld+json"]}
|
||||||
]
|
]
|
||||||
|
|
||||||
adapter = {@adapter, opts}
|
adapter = {@adapter, opts}
|
||||||
|
|
Loading…
Reference in a new issue