diff options
author | kaniini <nenolod@gmail.com> | 2019-01-25 05:19:32 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-01-25 05:19:32 +0000 |
commit | 4c99b6d35abe2beb184a12f7cba6f84a0fc6a27a (patch) | |
tree | ea0088876ab982a270a286048316e0eed6c18af7 /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | 4df71cd88b2725f1838c2899b3078a74dbb0c33f (diff) | |
parent | 9274cabe01977a3c2d35059d7889c63e2bd54de1 (diff) | |
download | pleroma-4c99b6d35abe2beb184a12f7cba6f84a0fc6a27a.tar.gz pleroma-4c99b6d35abe2beb184a12f7cba6f84a0fc6a27a.zip |
Merge branch 'fix/tusky-dm' into 'develop'
Add actor to recipients list
Closes #390
See merge request pleroma/pleroma!683
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 8443dc856..6004285d6 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -148,7 +148,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert %{"id" => id, "visibility" => "direct"} = json_response(conn, 200) assert activity = Repo.get(Activity, id) - assert activity.recipients == [user2.ap_id] + assert activity.recipients == [user2.ap_id, user1.ap_id] assert activity.data["to"] == [user2.ap_id] assert activity.data["cc"] == [] end @@ -182,6 +182,16 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert %{"visibility" => "direct"} = status assert status["url"] != direct.data["id"] + # User should be able to see his own direct message + res_conn = + build_conn() + |> assign(:user, user_one) + |> get("api/v1/timelines/direct") + + [status] = json_response(res_conn, 200) + + assert %{"visibility" => "direct"} = status + # Both should be visible here res_conn = conn |