Browse Source

ConversationView: add current user to conversations, according to Mastodon behaviour

2298-weird-follow-issue
Alibek Omarov Gitea 3 years ago
parent
commit
241bd061fc
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      lib/pleroma/web/mastodon_api/views/conversation_view.ex

+ 1
- 3
lib/pleroma/web/mastodon_api/views/conversation_view.ex View File

@@ -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",


Loading…
Cancel
Save