A platform for community discussion. Free, open, simple.
FiX: Update date url for thread oneboxes (#24172)
Jan Cernik6269134eedf9
diff --git a/plugins/chat/lib/onebox/templates/discourse_chat_message.mustache b/plugins/chat/lib/onebox/templates/discourse_chat_message.mustacheindex ae157c505a3..0d3ed10ec09 100644--- a/plugins/chat/lib/onebox/templates/discourse_chat_message.mustache+++ b/plugins/chat/lib/onebox/templates/discourse_chat_message.mustache@@ -7,7 +7,12 @@</div><div class="chat-transcript-username">{{username}}</div><div class="chat-transcript-datetime">- <a href="/chat/c/-/{{channel_id}}" title="{{created_at}}">{{created_at}}</a>+ {{#thread_id}}+ <a href="/chat/c/-/{{channel_id}}/t/{{thread_id}}/{{message_id}}" title="{{created_at}}">{{created_at}}</a>+ {{/thread_id}}+ {{^thread_id}}+ <a href="/chat/c/-/{{channel_id}}/{{message_id}}" title="{{created_at}}">{{created_at}}</a>+ {{/thread_id}}</div><a class="chat-transcript-channel" href="/chat/c/-/{{channel_id}}">{{#is_category}}diff --git a/plugins/chat/spec/lib/chat/onebox_handler_spec.rb b/plugins/chat/spec/lib/chat/onebox_handler_spec.rbindex adf0454dd20..02ddae356cd 100644--- a/plugins/chat/spec/lib/chat/onebox_handler_spec.rb+++ b/plugins/chat/spec/lib/chat/onebox_handler_spec.rb@@ -93,7 +93,7 @@ describe Chat::OneboxHandler do</div><div class="chat-transcript-username">#{user.username}</div><div class="chat-transcript-datetime">- <a href="/chat/c/-/#{public_channel.id}" title="#{public_message.created_at}">#{public_message.created_at}</a>+ <a href="/chat/c/-/#{public_channel.id}/#{public_message.id}" title="#{public_message.created_at}">#{public_message.created_at}</a></div><a class="chat-transcript-channel" href="/chat/c/-/#{public_channel.id}"><span class="category-chat-badge" style="color: ##{public_channel.chatable.color}">