mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 04:35:35 +08:00
FIX: Chat summary email link in subfolder setups (#25188)
This regressed in 2791e75072329fdbf9ebd6849cea3c63664b123c. That commit fixed subfolder URLs in general, but the `full_url` was adding the subfolder prefix a second time, thus breaking this URL in emails.
This commit is contained in:
parent
bcb31f79ce
commit
26747540d2
plugins/chat
@ -236,7 +236,7 @@ module Chat
|
|||||||
end
|
end
|
||||||
|
|
||||||
def full_url
|
def full_url
|
||||||
"#{Discourse.base_url}#{url}"
|
"#{Discourse.base_url_no_prefix}#{url}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def url
|
def url
|
||||||
|
@ -637,6 +637,17 @@ describe UserNotifications do
|
|||||||
expect(user_avatar.attribute("alt").value).to eq(sender.username)
|
expect(user_avatar.attribute("alt").value).to eq(sender.username)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "with subfolder" do
|
||||||
|
before { set_subfolder "/community" }
|
||||||
|
|
||||||
|
it "includes correct view summary link in template" do
|
||||||
|
email = described_class.chat_summary(user, {})
|
||||||
|
expect(email.html_part.body.to_s).to include(
|
||||||
|
"<a class=\"more-messages-link\" href=\"#{Discourse.base_url}/chat",
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context "when there are more than two mentions" do
|
context "when there are more than two mentions" do
|
||||||
it "includes a view more link " do
|
it "includes a view more link " do
|
||||||
2.times do
|
2.times do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user