[TwitterAPI] add in_reply_to_screen_name to statuses
Closes: https://git.pleroma.social/pleroma/pleroma/issues/68
This commit is contained in:
parent
d93789dfde
commit
fdfeff3013
|
@ -138,9 +138,12 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
}
|
||||
|
||||
if inReplyTo do
|
||||
reply_nickname = User.get_cached_by_ap_id(inReplyTo.data["object"]["actor"]).nickname || ""
|
||||
|
||||
object
|
||||
|> Map.put("inReplyTo", inReplyTo.data["object"]["id"])
|
||||
|> Map.put("inReplyToStatusId", inReplyTo.id)
|
||||
|> Map.put("inReplyToScreenName", reply_nickname)
|
||||
else
|
||||
object
|
||||
end
|
||||
|
|
|
@ -180,6 +180,7 @@ 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" => object["inReplyToScreenName"],
|
||||
"statusnet_conversation_id" => conversation_id,
|
||||
"attachments" => (object["attachment"] || []) |> ObjectRepresenter.enum_to_list(opts),
|
||||
"attentions" => attentions,
|
||||
|
|
Loading…
Reference in New Issue