From: Ivan Tashkinov Date: Wed, 13 Jan 2021 19:11:16 +0000 (+0300) Subject: Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e3508988283a0902a7e330995a0c224811956bce;p=akkoma Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags-rework --- e3508988283a0902a7e330995a0c224811956bce diff --cc test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs index a33959d9f,108f27ef7..50bf619a7 --- a/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs +++ b/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs @@@ -37,10 -37,9 +37,10 @@@ defmodule Pleroma.Web.ActivityPub.Trans data = File.read!("test/fixtures/kroeg-array-less-hashtag.json") |> Jason.decode!() {:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data) - object = Object.normalize(data["object"]) + object = Object.normalize(data["object"], fetch: false) - assert "test" in object.data["tag"] + assert "test" in Object.tags(object) + assert Object.hashtags(object) == ["test"] end test "it cleans up incoming notices which are not really DMs" do @@@ -219,10 -218,9 +219,10 @@@ data = File.read!("test/fixtures/mastodon-post-activity-hashtag.json") |> Jason.decode!() {:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data) - object = Object.normalize(data["object"]) + object = Object.normalize(data["object"], fetch: false) - assert Enum.at(object.data["tag"], 2) == "moo" + assert Enum.at(Object.tags(object), 2) == "moo" + assert Object.hashtags(object) == ["moo"] end test "it works for incoming notices with contentMap" do diff --cc test/pleroma/web/common_api_test.exs index 1e98208fb,2ece92806..209fa86f6 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@@ -491,9 -491,9 +491,9 @@@ defmodule Pleroma.Web.CommonAPITest d user = insert(:user) {:ok, activity} = CommonAPI.post(user, %{status: "#2hu #2HU"}) - object = Object.normalize(activity) + object = Object.normalize(activity, fetch: false) - assert object.data["tag"] == ["2hu"] + assert Object.tags(object) == ["2hu"] end test "it adds emoji in the object" do