aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-03-24 00:00:06 +0100
committerRoger Braun <roger@rogerbraun.net>2017-03-24 00:00:06 +0100
commitae50b165cced7fda1e62f677f959c6f202127aa7 (patch)
tree9032822fed88349e53cb0b2990854919cd2050fa
parente56dba1563b6abb8c771b4fc346bf2ffb8d46b01 (diff)
downloadpleroma-ae50b165cced7fda1e62f677f959c6f202127aa7.tar.gz
Add inReplyToStatus to TwAPI.
-rw-r--r--lib/pleroma/web/twitter_api/representers/activity_representer.ex3
-rw-r--r--test/web/twitter_api/representers/activity_representer_test.exs6
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index a0f20c37c..3b0683043 100644
--- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@ -14,7 +14,8 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
"text" => content,
"is_local" => true,
"is_post_verb" => true,
- "created_at" => published
+ "created_at" => published,
+ "in_reply_to_status_id" => activity.data["object"]["inReplyToStatusId"]
}
end
end
diff --git a/test/web/twitter_api/representers/activity_representer_test.exs b/test/web/twitter_api/representers/activity_representer_test.exs
index d40455c89..b65101115 100644
--- a/test/web/twitter_api/representers/activity_representer_test.exs
+++ b/test/web/twitter_api/representers/activity_representer_test.exs
@@ -23,7 +23,8 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
"object" => %{
"published" => date,
"type" => "Note",
- "content" => content
+ "content" => content,
+ "inReplyToStatusId" => 213123
},
"published" => date
}
@@ -38,7 +39,8 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
"statusnet_html" => content,
"text" => content,
"is_post_verb" => true,
- "created_at" => date
+ "created_at" => date,
+ "in_reply_to_status_id" => 213123
}
assert ActivityRepresenter.to_map(activity, %{user: user, for: follower}) == expected_status