Use correct logic to determine "attentions" list

This commit is contained in:
Maxim Filippov 2019-01-24 23:30:43 +03:00
commit 9274cabe01
5 changed files with 56 additions and 54 deletions

View file

@ -118,8 +118,9 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
expected = %{
"activity_type" => "post",
"attachments" => [],
"attentions" =>
Enum.map([other_user, user], fn u -> UserView.render("show.json", %{user: u}) end),
"attentions" => [
UserView.render("show.json", %{user: other_user})
],
"created_at" => activity.data["object"]["published"] |> Utils.date_to_asctime(),
"external_url" => activity.data["object"]["id"],
"fave_num" => 0,