diff options
author | rinpatch <rinpatch@sdf.org> | 2019-08-07 00:23:58 +0300 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2019-08-14 01:50:21 +0000 |
commit | 1807d3a115edf12510b2ca735c7aea3d3f57e5f8 (patch) | |
tree | 611ce4acf90e6425c62127d93594c878b3805f36 | |
parent | b85840b536f9be391120db5d3e0e7934c8ed9390 (diff) | |
download | pleroma-1807d3a115edf12510b2ca735c7aea3d3f57e5f8.tar.gz |
OStatus Announce Representer: Do not depend on the object being embedded
in the Create activity
-rw-r--r-- | lib/pleroma/web/ostatus/activity_representer.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex index 95037125d..2f23e5730 100644 --- a/lib/pleroma/web/ostatus/activity_representer.ex +++ b/lib/pleroma/web/ostatus/activity_representer.ex @@ -182,6 +182,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do author = if with_author, do: [{:author, UserRepresenter.to_simple_form(user)}], else: [] retweeted_activity = Activity.get_create_by_object_ap_id(activity.data["object"]) + retweeted_object = Object.normalize(retweeted_activity) retweeted_user = User.get_cached_by_ap_id(retweeted_activity.data["actor"]) retweeted_xml = to_simple_form(retweeted_activity, retweeted_user, true) @@ -196,7 +197,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do {:"activity:verb", ['http://activitystrea.ms/schema/1.0/share']}, {:id, h.(activity.data["id"])}, {:title, ['#{user.nickname} repeated a notice']}, - {:content, [type: 'html'], ['RT #{retweeted_activity.data["object"]["content"]}']}, + {:content, [type: 'html'], ['RT #{retweeted_object.data["content"]}']}, {:published, h.(inserted_at)}, {:updated, h.(updated_at)}, {:"ostatus:conversation", [ref: h.(activity.data["context"])], |