query =
ActivityPub.fetch_activities_query(
[user.ap_id],
- Map.merge(params, %{"type" => "Create", visibility: "direct"})
+ Map.merge(params, %{"type" => "Create", "user" => user, visibility: "direct"})
)
activities = Repo.all(query)
"visibility" => "direct"
})
+ {:ok, direct_two} =
+ CommonAPI.post(user_two, %{
+ "status" => "Hi @#{user_one.nickname}!",
+ "visibility" => "direct"
+ })
+
{:ok, _follower_only} =
CommonAPI.post(user_one, %{
"status" => "Hi @#{user_two.nickname}!",
|> assign(:user, user_two)
|> get("/api/statuses/dm_timeline.json")
- [status] = json_response(res_conn, 200)
- assert status["id"] == direct.id
+ [status, status_two] = json_response(res_conn, 200)
+ assert status["id"] == direct_two.id
+ assert status_two["id"] == direct.id
end
end