mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-23 01:35:28 +00:00
Repair retweets.
This commit is contained in:
parent
f73cd6f3ce
commit
1b67a59795
|
@ -120,10 +120,10 @@ defmodule Pleroma.Web.OStatus do
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_content(entry) do
|
def get_content(entry) do
|
||||||
base_content = string_from_xpath("/entry/content", entry)
|
base_content = string_from_xpath("//content", entry)
|
||||||
|
|
||||||
with scope when not is_nil(scope) <- string_from_xpath("//mastodon:scope", entry),
|
with scope when not is_nil(scope) <- string_from_xpath("//mastodon:scope", entry),
|
||||||
cw when not is_nil(cw) <- string_from_xpath("/entry/summary", entry) do
|
cw when not is_nil(cw) <- string_from_xpath("//summary", entry) do
|
||||||
"<span class='mastodon-cw'>#{cw}</span><br>#{base_content}"
|
"<span class='mastodon-cw'>#{cw}</span><br>#{base_content}"
|
||||||
else _e -> base_content
|
else _e -> base_content
|
||||||
end
|
end
|
||||||
|
|
|
@ -98,6 +98,7 @@ defmodule Pleroma.Web.OStatusTest do
|
||||||
assert retweeted_activity.data["actor"] == "https://pleroma.soykaf.com/users/lain"
|
assert retweeted_activity.data["actor"] == "https://pleroma.soykaf.com/users/lain"
|
||||||
refute retweeted_activity.local
|
refute retweeted_activity.local
|
||||||
assert retweeted_activity.data["object"]["announcement_count"] == 1
|
assert retweeted_activity.data["object"]["announcement_count"] == 1
|
||||||
|
assert String.contains?(retweeted_activity.data["object"]["content"], "mastodon")
|
||||||
end
|
end
|
||||||
|
|
||||||
test "handle incoming retweets - GS, subscription - local message" do
|
test "handle incoming retweets - GS, subscription - local message" do
|
||||||
|
|
Loading…
Reference in a new issue