Impossible to view reposts for which no Create activity exists?
Digging into the code for MastodonAPI.StatusView I notice it really tries to get the Create
activity for all reposts...
parent_activities =
activities
|> Enum.filter(&(&1.data["type"] == "Announce" && &1.data["object"]))
|> Enum.map(&Object.normalize(&1, fetch: false).data["id"])
|> Activity.create_by_object_ap_id()
|> Activity.with_preloaded_object(:left)
|> Activity.with_preloaded_bookmark(reading_user)
|> Activity.with_set_thread_muted_field(reading_user)
|> Repo.all()
This is in "index.json"
and the Activity.create_by_object_ap_id()
is the important part here.
What if there's is no Create
? You only get the Create
if the origin server sent it to you, and you won't get it from an Announce
.
How is this even working right now? It seems like it really shouldn't be able to, and it's causing errors on my Groups branch. I'm going to refactor this.
Related to !3508 (merged)
Edited by Alex Gleason