Fix the confusingly named and inverted logic of "no_attachment_links"

The setting is now simply "attachment_links" and the boolean value does
what you expect. A double negative is never possible and describing the
functionality is no longer a philospher's worst nightmare.
This commit is contained in:
Mark Felder 2020-02-11 15:39:19 -06:00
commit ff9fd4ca89
6 changed files with 13 additions and 12 deletions

View file

@ -575,11 +575,11 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
end
describe "maybe_add_attachments/3" do
test "returns parsed results when no_links is true" do
test "returns parsed results when attachment_links is false" do
assert Utils.maybe_add_attachments(
{"test", [], ["tags"]},
[],
true
false
) == {"test", [], ["tags"]}
end
@ -589,7 +589,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
assert Utils.maybe_add_attachments(
{"test", [], ["tags"]},
[attachment],
false
true
) == {
"test<br><a href=\"SakuraPM.png\" class='attachment'>SakuraPM.png</a>",
[],