Merge remote-tracking branch 'remotes/upstream/develop' into 1304-user-info-deprecation
# Conflicts: # CHANGELOG.md # lib/pleroma/notification.ex # lib/pleroma/user.ex # lib/pleroma/user/info.ex # lib/pleroma/web/activity_pub/activity_pub.ex # lib/pleroma/web/admin_api/admin_api_controller.ex # lib/pleroma/web/ostatus/handlers/follow_handler.ex # lib/pleroma/web/ostatus/ostatus.ex # lib/pleroma/web/salmon/salmon.ex # lib/pleroma/web/websub/websub.ex # test/web/admin_api/admin_api_controller_test.exs # test/web/federator_test.exs # test/web/mastodon_api/controllers/conversation_controller_test.exs # test/web/ostatus/ostatus_controller_test.exs # test/web/ostatus/ostatus_test.exs # test/web/salmon/salmon_test.exs # test/web/websub/websub_test.exs
This commit is contained in:
commit
c6fdfbc4f1
112 changed files with 2220 additions and 4279 deletions
|
|
@ -425,8 +425,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
other_user = insert(:user)
|
||||
|
||||
{:ok, _activity} =
|
||||
CommonAPI.post(user, %{
|
||||
"status" => "Hey @#{other_user.nickname}.",
|
||||
CommonAPI.post(other_user, %{
|
||||
"status" => "Hey @#{user.nickname}.",
|
||||
"visibility" => "direct"
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
alias Pleroma.Web.CommonAPI.Utils
|
||||
alias Pleroma.Web.MastodonAPI.AccountView
|
||||
alias Pleroma.Web.MastodonAPI.StatusView
|
||||
alias Pleroma.Web.OStatus
|
||||
import Pleroma.Factory
|
||||
import Tesla.Mock
|
||||
|
||||
|
|
@ -230,17 +229,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
end
|
||||
|
||||
test "contains mentions" do
|
||||
incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml")
|
||||
# a user with this ap id might be in the cache.
|
||||
recipient = "https://pleroma.soykaf.com/users/lain"
|
||||
user = insert(:user, %{ap_id: recipient})
|
||||
user = insert(:user)
|
||||
mentioned = insert(:user)
|
||||
|
||||
{:ok, [activity]} = OStatus.handle_incoming(incoming)
|
||||
{:ok, activity} = CommonAPI.post(user, %{"status" => "hi @#{mentioned.nickname}"})
|
||||
|
||||
status = StatusView.render("show.json", %{activity: activity})
|
||||
|
||||
assert status.mentions ==
|
||||
Enum.map([user], fn u -> AccountView.render("mention.json", %{user: u}) end)
|
||||
Enum.map([mentioned], fn u -> AccountView.render("mention.json", %{user: u}) end)
|
||||
end
|
||||
|
||||
test "create mentions from the 'to' field" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue