FEATURE: Link chat notifications directly to message (#23617)

- Updates `Chat::Message#url` to work in threads and for subfolder
- Updates Jobs::Chat::NotifyWatching to use message URL instead of channel url
This commit is contained in:
David Taylor
2023-09-16 20:37:35 +01:00
committed by GitHub
parent ebe68e15fc
commit 2791e75072
4 changed files with 24 additions and 6 deletions

View File

@ -250,7 +250,11 @@ module Chat
end
def url
"/chat/c/-/#{self.chat_channel_id}/#{self.id}"
if in_thread?
"#{Discourse.base_path}/chat/c/-/#{self.chat_channel_id}/t/#{self.thread_id}/#{self.id}"
else
"#{Discourse.base_path}/chat/c/-/#{self.chat_channel_id}/#{self.id}"
end
end
def create_mentions