aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-11-10 17:18:19 +0100
committerRoger Braun <roger@rogerbraun.net>2017-11-10 17:18:19 +0100
commit6e9c22c0afaa67f0b94f602eceef5c57b7c9192f (patch)
tree18dc2e310f811a5f1b9fd175574c96378ac279a2 /lib
parentf1d27a5fbbe547a78f835bd65b43a652004d708e (diff)
downloadpleroma-6e9c22c0afaa67f0b94f602eceef5c57b7c9192f.tar.gz
MastoAPI: Use string ids everywhere.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex6
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex3
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index cf97ab746..16322cf21 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -18,7 +18,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
header = image_url(user.info["banner"]) || "https://placehold.it/700x335"
%{
- id: user.id,
+ id: to_string(user.id),
username: hd(String.split(user.nickname, "@")),
acct: user.nickname,
display_name: user.name,
@@ -43,7 +43,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
def render("mention.json", %{user: user}) do
%{
- id: user.id,
+ id: to_string(user.id),
acct: user.nickname,
username: hd(String.split(user.nickname, "@")),
url: user.ap_id
@@ -52,7 +52,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
def render("relationship.json", %{user: user, target: target}) do
%{
- id: target.id,
+ id: to_string(target.id),
following: User.following?(user, target),
followed_by: User.following?(target, user),
blocking: User.blocks?(user, target),
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 09a2ca404..a0acdb0ac 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -45,7 +45,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
name: "Web",
website: nil
},
- language: nil
+ language: nil,
+ emoji: []
}
end