aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-11-25 20:56:12 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-12-04 04:52:09 +0000
commit3b8e5bcbeb03f3cfa5de1c4e7a4f3a04871094d1 (patch)
treebc32c26e08234ca4cbf71605cdb57c7541ad124e /lib
parentdd66cc2ca6c99d5b1586133dd85d8d36d5cbaaa7 (diff)
downloadpleroma-3b8e5bcbeb03f3cfa5de1c4e7a4f3a04871094d1.tar.gz
fix most tests
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex4
-rw-r--r--lib/pleroma/web/twitter_api/representers/activity_representer.ex4
-rw-r--r--lib/pleroma/web/twitter_api/views/activity_view.ex2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 3b4911d53..31f4675c3 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -134,7 +134,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
%{
id: to_string(activity.id),
uri: object.data["id"],
- url: object.data["external_url"] || object["id"],
+ url: object.data["external_url"] || object.data["id"],
account: AccountView.render("account.json", %{user: user}),
in_reply_to_id: reply_to && to_string(reply_to.id),
in_reply_to_account_id: reply_to_user && to_string(reply_to_user.id),
@@ -149,7 +149,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
muted: false,
sensitive: sensitive,
spoiler_text: object.data["summary"] || "",
- visibility: get_visibility(object),
+ visibility: get_visibility(object.data),
media_attachments: attachments |> Enum.take(4),
mentions: mentions,
# fix,
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index 4b4e202b3..436f9bf92 100644
--- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@ -167,14 +167,14 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
tags = if possibly_sensitive, do: Enum.uniq(["nsfw" | tags]), else: tags
- {summary, content} = ActivityView.render_content(object)
+ {summary, content} = ActivityView.render_content(object.data)
html =
HTML.filter_tags(content, User.html_filter_policy(opts[:for]))
|> Formatter.emojify(object.data["emoji"])
video =
- if object["type"] == "Video" do
+ if object.data["type"] == "Video" do
vid = [object.data]
else
[]
diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex
index 7839fe878..f202b6e97 100644
--- a/lib/pleroma/web/twitter_api/views/activity_view.ex
+++ b/lib/pleroma/web/twitter_api/views/activity_view.ex
@@ -265,7 +265,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
"tags" => tags,
"activity_type" => "post",
"possibly_sensitive" => possibly_sensitive,
- "visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
+ "visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object.data),
"summary" => summary
}
end