adapt emoji qualification for customs
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
This commit is contained in:
parent
bc9074b9e4
commit
3ba6667654
|
@ -125,7 +125,7 @@ defmodule Pleroma.Emoji do
|
||||||
|> String.split("\n")
|
|> String.split("\n")
|
||||||
|> Enum.filter(fn line ->
|
|> Enum.filter(fn line ->
|
||||||
line != "" and not String.starts_with?(line, "#") and
|
line != "" and not String.starts_with?(line, "#") and
|
||||||
String.contains?(line, "qualified")
|
String.contains?(line, "fully-qualified")
|
||||||
end)
|
end)
|
||||||
|> Enum.map(fn line ->
|
|> Enum.map(fn line ->
|
||||||
line
|
line
|
||||||
|
|
|
@ -13,8 +13,8 @@ defmodule Pleroma.EmojiTest do
|
||||||
|
|
||||||
# Accept fully-qualified and unqualified emoji
|
# Accept fully-qualified and unqualified emoji
|
||||||
# See http://www.unicode.org/reports/tr51/
|
# See http://www.unicode.org/reports/tr51/
|
||||||
assert Emoji.is_unicode_emoji?("❤")
|
refute Emoji.is_unicode_emoji?("❤")
|
||||||
assert Emoji.is_unicode_emoji?("☂")
|
refute Emoji.is_unicode_emoji?("☂")
|
||||||
|
|
||||||
assert Emoji.is_unicode_emoji?("🥺")
|
assert Emoji.is_unicode_emoji?("🥺")
|
||||||
assert Emoji.is_unicode_emoji?("🤰")
|
assert Emoji.is_unicode_emoji?("🤰")
|
||||||
|
|
|
@ -114,7 +114,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiReactHandlingTest do
|
||||||
object = Object.get_by_ap_id(data["object"])
|
object = Object.get_by_ap_id(data["object"])
|
||||||
|
|
||||||
assert object.data["reaction_count"] == 1
|
assert object.data["reaction_count"] == 1
|
||||||
assert match?([[emoji, _]], object.data["reactions"])
|
assert match?([[^emoji, _, _]], object.data["reactions"])
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it reject invalid emoji reactions" do
|
test "it reject invalid emoji reactions" do
|
||||||
|
|
Loading…
Reference in a new issue