diff options
author | Alibek Omarov <a1ba.omarov@gmail.com> | 2020-10-16 18:28:27 +0000 |
---|---|---|
committer | Gitea <gitea@fake.local> | 2020-10-30 12:58:51 +0100 |
commit | 241bd061fc60a5c90c172f46f3b4e576ba660aaf (patch) | |
tree | 0a01e99fe43cafd589d944dc5cd24eb6519e27ac | |
parent | 131f3219e6b895139c5647cd2050dd22adce7139 (diff) | |
download | pleroma-241bd061fc60a5c90c172f46f3b4e576ba660aaf.tar.gz |
ConversationView: add current user to conversations, according to Mastodon behaviour
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/conversation_view.ex | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/conversation_view.ex b/lib/pleroma/web/mastodon_api/views/conversation_view.ex index a91994915..cf34933ab 100644 --- a/lib/pleroma/web/mastodon_api/views/conversation_view.ex +++ b/lib/pleroma/web/mastodon_api/views/conversation_view.ex @@ -33,12 +33,10 @@ defmodule Pleroma.Web.MastodonAPI.ConversationView do end activity = Activity.get_by_id_with_object(last_activity_id) - # Conversations return all users except the current user. - users = Enum.reject(participation.recipients, &(&1.id == user.id)) %{ id: participation.id |> to_string(), - accounts: render(AccountView, "index.json", users: users, for: user), + accounts: render(AccountView, "index.json", users: participation.recipients, for: user), unread: !participation.read, last_status: render(StatusView, "show.json", |