diff options
author | lambda <lain@soykaf.club> | 2019-06-03 09:48:37 +0000 |
---|---|---|
committer | lambda <lain@soykaf.club> | 2019-06-03 09:48:37 +0000 |
commit | 314758c25bbc0044afcec98710c36532a1dc7e0d (patch) | |
tree | 56f737d7ee009acd73726345085b95a89b182191 /lib | |
parent | e71da4468e8f6e9e4f45a48f6fb266a89eade541 (diff) | |
parent | 97fb50d9faaea509e3e7809689f4aa045634fa81 (diff) | |
download | pleroma-314758c25bbc0044afcec98710c36532a1dc7e0d.tar.gz |
Merge branch 'align-mastodon-conversations' into 'develop'
Mastodon Conversations API: Align to Mastodon behavior
See merge request pleroma/pleroma!1215
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/conversation_view.ex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/conversation_view.ex b/lib/pleroma/web/mastodon_api/views/conversation_view.ex index 8e8f7cf31..af1dcf66d 100644 --- a/lib/pleroma/web/mastodon_api/views/conversation_view.ex +++ b/lib/pleroma/web/mastodon_api/views/conversation_view.ex @@ -22,9 +22,14 @@ defmodule Pleroma.Web.MastodonAPI.ConversationView do last_status = StatusView.render("status.json", %{activity: activity, for: user}) + # Conversations return all users except the current user. + users = + participation.conversation.users + |> Enum.reject(&(&1.id == user.id)) + accounts = AccountView.render("accounts.json", %{ - users: participation.conversation.users, + users: users, as: :user }) |