projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
45a11aa
)
Reblog content should be ""
author
FloatingGhost
<hannah@coffee-and-dreams.uk>
Thu, 2 Mar 2023 11:04:27 +0000
(11:04 +0000)
committer
FloatingGhost
<hannah@coffee-and-dreams.uk>
Thu, 2 Mar 2023 11:04:27 +0000
(11:04 +0000)
Fixes #450
lib/pleroma/web/mastodon_api/views/status_view.ex
patch
|
blob
|
history
test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
patch
|
blob
|
history
test/pleroma/web/mastodon_api/views/status_view_test.exs
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/mastodon_api/views/status_view.ex
b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 48756e78b6cb26f490ef3efb901c225d3dda89dd..79438571cd26a5dbcebd58f0182456040e117e9c 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/status_view.ex
@@
-183,7
+183,7
@@
defmodule Pleroma.Web.MastodonAPI.StatusView do
in_reply_to_id: nil,
in_reply_to_account_id: nil,
reblog: reblogged,
in_reply_to_id: nil,
in_reply_to_account_id: nil,
reblog: reblogged,
- content:
reblogged[:content] ||
"",
+ content: "",
created_at: created_at,
reblogs_count: 0,
replies_count: 0,
created_at: created_at,
reblogs_count: 0,
replies_count: 0,
diff --git
a/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
b/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
index 523a17c17e66380c130841543367d36e4a1f0c04..f1aee27d474f7946d219a7db1d02f402bfdf6bbe 100644
(file)
--- a/
test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
+++ b/
test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
@@
-135,7
+135,7
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
assert content =~ "@oops_not_a_mention"
assert content =~
assert content =~ "@oops_not_a_mention"
assert content =~
- "<span class=\"mfm _mfm_jelly_\"
style=\"display: inline-block; animation: 1s linear 0s infinite normal both running mfm-rubberBand;\"
>mfm goes here</span> </p>aaa"
+ "<span class=\"mfm _mfm_jelly_\">mfm goes here</span> </p>aaa"
assert content =~ "some text<br/>newline"
end
assert content =~ "some text<br/>newline"
end
diff --git
a/test/pleroma/web/mastodon_api/views/status_view_test.exs
b/test/pleroma/web/mastodon_api/views/status_view_test.exs
index b3f0a178155a7ab902b8d206a672c54ce42ec1bb..682c633f4be5a92f839b4385acf1474967870dd4 100644
(file)
--- a/
test/pleroma/web/mastodon_api/views/status_view_test.exs
+++ b/
test/pleroma/web/mastodon_api/views/status_view_test.exs
@@
-594,6
+594,7
@@
defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
represented = StatusView.render("show.json", %{for: user, activity: reblog})
assert represented[:id] == to_string(reblog.id)
represented = StatusView.render("show.json", %{for: user, activity: reblog})
assert represented[:id] == to_string(reblog.id)
+ assert represented[:content] == ""
assert represented[:reblog][:id] == to_string(activity.id)
assert represented[:emojis] == []
assert_schema(represented, "Status", Pleroma.Web.ApiSpec.spec())
assert represented[:reblog][:id] == to_string(activity.id)
assert represented[:emojis] == []
assert_schema(represented, "Status", Pleroma.Web.ApiSpec.spec())