logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: ae50b165cced7fda1e62f677f959c6f202127aa7
parent: e56dba1563b6abb8c771b4fc346bf2ffb8d46b01
Author: Roger Braun <roger@rogerbraun.net>
Date:   Fri, 24 Mar 2017 00:00:06 +0100

Add inReplyToStatus to TwAPI.

Diffstat:

Mlib/pleroma/web/twitter_api/representers/activity_representer.ex3++-
Mtest/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 @@ -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 @@ -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