diff --git a/plugins/chat/app/models/chat/message.rb b/plugins/chat/app/models/chat/message.rb index a374fa59c72..5fa0eaa987e 100644 --- a/plugins/chat/app/models/chat/message.rb +++ b/plugins/chat/app/models/chat/message.rb @@ -236,7 +236,7 @@ module Chat end def full_url - "#{Discourse.base_url}#{url}" + "#{Discourse.base_url_no_prefix}#{url}" end def url diff --git a/plugins/chat/spec/mailers/user_notifications_spec.rb b/plugins/chat/spec/mailers/user_notifications_spec.rb index 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 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( + "