mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-11-11 00:29:03 +01:00
[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
|
if inReplyTo do
|
||||||
|
reply_nickname = User.get_cached_by_ap_id(inReplyTo.data["object"]["actor"]).nickname || ""
|
||||||
|
|
||||||
object
|
object
|
||||||
|> Map.put("inReplyTo", inReplyTo.data["object"]["id"])
|
|> Map.put("inReplyTo", inReplyTo.data["object"]["id"])
|
||||||
|> Map.put("inReplyToStatusId", inReplyTo.id)
|
|> Map.put("inReplyToStatusId", inReplyTo.id)
|
||||||
|
|> Map.put("inReplyToScreenName", reply_nickname)
|
||||||
else
|
else
|
||||||
object
|
object
|
||||||
end
|
end
|
||||||
|
@ -180,6 +180,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
|
|||||||
"is_post_verb" => true,
|
"is_post_verb" => true,
|
||||||
"created_at" => created_at,
|
"created_at" => created_at,
|
||||||
"in_reply_to_status_id" => object["inReplyToStatusId"],
|
"in_reply_to_status_id" => object["inReplyToStatusId"],
|
||||||
|
"in_reply_to_screen_name" => object["inReplyToScreenName"],
|
||||||
"statusnet_conversation_id" => conversation_id,
|
"statusnet_conversation_id" => conversation_id,
|
||||||
"attachments" => (object["attachment"] || []) |> ObjectRepresenter.enum_to_list(opts),
|
"attachments" => (object["attachment"] || []) |> ObjectRepresenter.enum_to_list(opts),
|
||||||
"attentions" => attentions,
|
"attentions" => attentions,
|
||||||
|
Loading…
Reference in New Issue
Block a user