X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fostatus%2Factivity_representer.ex;h=1e9d4a7fbb354ed7f7c93d55a791d3fd0cd18a91;hb=4d5ec883b7e7f54d92574a4cf0bdda781e7423e2;hp=921a89bd015fca545652f3c0f202996e0d220080;hpb=8b4ee0ea51431e268011781403bc97864b294989;p=akkoma diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex index 921a89bd0..1e9d4a7fb 100644 --- a/lib/pleroma/web/ostatus/activity_representer.ex +++ b/lib/pleroma/web/ostatus/activity_representer.ex @@ -240,7 +240,13 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do inserted_at = activity.data["published"] author = if with_author, do: [{:author, UserRepresenter.to_simple_form(user)}], else: [] - follow_activity = Activity.get_by_ap_id(activity.data["object"]) + + follow_activity = + if is_map(activity.data["object"]) do + Activity.get_by_ap_id(activity.data["object"]["id"]) + else + Activity.get_by_ap_id(activity.data["object"]) + end mentions = (activity.recipients || []) |> get_mentions