FIX: Chat summary email link in subfolder setups (#25188)
This regressed in 2791e75072
. 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
|
@ -236,7 +236,7 @@ module Chat
|
|||
end
|
||||
|
||||
def full_url
|
||||
"#{Discourse.base_url}#{url}"
|
||||
"#{Discourse.base_url_no_prefix}#{url}"
|
||||
end
|
||||
|
||||
def url
|
||||
|
|
|
@ -637,6 +637,17 @@ describe UserNotifications do
|
|||
expect(user_avatar.attribute("alt").value).to eq(sender.username)
|
||||
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
|
||||
it "includes a view more link " do
|
||||
2.times do
|
||||
|
|
Loading…
Reference in New Issue