A platform for community discussion. Free, open, simple.
FIX: Chat summary email link in subfolder setups (#25188)
Penar Musaraj26747540d24e
diff --git a/plugins/chat/app/models/chat/message.rb b/plugins/chat/app/models/chat/message.rbindex a374fa59c72..5fa0eaa987e 100644--- a/plugins/chat/app/models/chat/message.rb+++ b/plugins/chat/app/models/chat/message.rb@@ -236,7 +236,7 @@ module Chatenddef full_url- "#{Discourse.base_url}#{url}"+ "#{Discourse.base_url_no_prefix}#{url}"enddef urldiff --git a/plugins/chat/spec/mailers/user_notifications_spec.rb b/plugins/chat/spec/mailers/user_notifications_spec.rbindex 183e1618f00..80e2f914d9e 100644--- a/plugins/chat/spec/mailers/user_notifications_spec.rb+++ b/plugins/chat/spec/mailers/user_notifications_spec.rb@@ -637,6 +637,17 @@ describe UserNotifications doexpect(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" doit "includes a view more link " do2.times do