transmogrifier: Add support for array-less hashtags, add broken announce, harden get_actor
This commit is contained in:
parent
f3291acc91
commit
eebe33e86a
5 changed files with 24 additions and 6 deletions
|
|
@ -121,14 +121,30 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||
"<p>henlo from my Psion netBook</p><p>message sent from my Psion netBook</p>"
|
||||
end
|
||||
|
||||
# Broken ;/
|
||||
#
|
||||
# test "it works for incoming announces with actor being inlined (kroeg)" do
|
||||
# data = File.read!("test/fixtures/kroeg-announce-with-inline-actor.json") |> Poison.decode!()
|
||||
#
|
||||
# {:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||
#
|
||||
# assert data["object"]["actor"] == "https://puckipedia.com/"
|
||||
# end
|
||||
|
||||
test "it works for incoming notices with tag not being an array (kroeg)" do
|
||||
data = File.read!("test/fixtures/https___puckipedia.com_1jjx-ob5r.json") |> Poison.decode!()
|
||||
data = File.read!("test/fixtures/kroeg-array-less-emoji.json") |> Poison.decode!()
|
||||
|
||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||
|
||||
assert data["object"]["emoji"] == %{
|
||||
"icon_e_smile" => "https://puckipedia.com/forum/images/smilies/icon_e_smile.png"
|
||||
}
|
||||
|
||||
data = File.read!("test/fixtures/kroeg-array-less-hashtag.json") |> Poison.decode!()
|
||||
|
||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||
|
||||
assert "test" in data["object"]["tag"]
|
||||
end
|
||||
|
||||
test "it works for incoming follow requests" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue