Add inReplyToStatus to TwAPI.
authorRoger Braun <roger@rogerbraun.net>
Thu, 23 Mar 2017 23:00:06 +0000 (00:00 +0100)
committerRoger Braun <roger@rogerbraun.net>
Thu, 23 Mar 2017 23:00:06 +0000 (00:00 +0100)
lib/pleroma/web/twitter_api/representers/activity_representer.ex
test/web/twitter_api/representers/activity_representer_test.exs

index a0f20c37c60e77d46871a04a3a799e8d4318ea73..3b06830430f5f7ee0128e164cd9eaf8c9f6b965e 100644 (file)
@@ -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
index d40455c89d279e50f69a0adb917ffded55767e44..b6510111529f029ea5d1533c7645341b57420e0b 100644 (file)
@@ -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