X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Ftwitter_api%2Frepresenters%2Factivity_representer.ex;h=fbd33f07ed1297dfe148c6b9e8e4a727c40bd86c;hb=79b1e4465f5c1ffd17a676d1eb1fc537143f7785;hp=04857001cdef9f1dc3ea6591be0881d0ca838771;hpb=fee43ae5e748368022cc5dc6393015ef64e0894b;p=akkoma diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex index 04857001c..fbd33f07e 100644 --- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex @@ -182,12 +182,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do reply_parent = Activity.get_in_reply_to_activity(activity) - reply_user_nickname = - if reply_parent do - User.get_cached_by_ap_id(reply_parent.actor).nickname - else - nil - end + reply_user = reply_parent && User.get_cached_by_ap_id(reply_parent.actor) %{ "id" => activity.id, @@ -199,7 +194,10 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do "is_post_verb" => true, "created_at" => created_at, "in_reply_to_status_id" => object["inReplyToStatusId"], - "in_reply_to_screen_name" => reply_user_nickname, + "in_reply_to_screen_name" => reply_user && reply_user.nickname, + "in_reply_to_profileurl" => User.profile_url(reply_user), + "in_reply_to_ostatus_uri" => reply_user && reply_user.ap_id, + "in_reply_to_user_id" => reply_user && reply_user.id, "statusnet_conversation_id" => conversation_id, "attachments" => attachments |> ObjectRepresenter.enum_to_list(opts), "attentions" => attentions,