aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-06-25 12:07:08 +0200
committerRoger Braun <roger@rogerbraun.net>2017-06-25 12:07:08 +0200
commit1c074efeaf720bba7a2ee81fd7ee1f01cfd084e4 (patch)
treeef88a15500de9da87fe77452b1cdd385cd9a5524 /lib
parent429992fcc921a15f853d08b975682499d83dea99 (diff)
downloadpleroma-1c074efeaf720bba7a2ee81fd7ee1f01cfd084e4.tar.gz
Add external links to twapi.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/twitter_api/representers/activity_representer.ex10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index 9be7338c7..a03b34ffb 100644
--- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@ -23,7 +23,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
"user" => UserView.render("show.json", %{user: user, for: opts[:for]}),
"statusnet_html" => text,
"text" => text,
- "is_local" => true,
+ "is_local" => activity.local,
"is_post_verb" => false,
"uri" => "tag:#{activity.data["id"]}:objectType=note",
"created_at" => created_at,
@@ -44,7 +44,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
"user" => UserView.render("show.json", %{user: user, for: opts[:for]}),
"statusnet_html" => text,
"text" => text,
- "is_local" => true,
+ "is_local" => activity.local,
"is_post_verb" => false,
"uri" => "tag:#{activity.data["id"]}:objectType=Favourite",
"created_at" => created_at,
@@ -64,7 +64,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
"attentions" => [],
"statusnet_html" => text,
"text" => text,
- "is_local" => true,
+ "is_local" => activity.local,
"is_post_verb" => false,
"created_at" => created_at,
"in_reply_to_status_id" => nil,
@@ -93,7 +93,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
"user" => UserView.render("show.json", %{user: user, for: opts[:for]}),
"statusnet_html" => HtmlSanitizeEx.basic_html(content) |> Formatter.finmojifiy,
"text" => HtmlSanitizeEx.strip_tags(content),
- "is_local" => true,
+ "is_local" => activity.local,
"is_post_verb" => true,
"created_at" => created_at,
"in_reply_to_status_id" => object["inReplyToStatusId"],
@@ -104,7 +104,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
"repeat_num" => announcement_count,
"favorited" => to_boolean(favorited),
"repeated" => to_boolean(repeated),
- "external_url" => activity.data["id"],
+ "external_url" => object["external_url"],
"tags" => activity.data["object"]["tag"] || []
}
end