FIX: Allow quoting thread's original message (#24773)

This commit is contained in:
Jan Cernik
2023-12-11 09:58:00 -03:00
committed by GitHub
parent 54724f7c09
commit 72872297f5
2 changed files with 103 additions and 2 deletions

View File

@ -30,6 +30,7 @@ const chatTranscriptRule = {
return;
}
const isThread = threadId && content.includes("[chat");
let wrapperDivToken = state.push("div_chat_transcript_wrap", "div", 1);
if (channelName && multiQuote) {
@ -53,7 +54,7 @@ const chatTranscriptRule = {
state.push("div_chat_transcript_meta", "div", -1);
}
if (threadId) {
if (isThread) {
state.push("details_chat_transcript_wrap_open", "details", 1);
state.push("summary_chat_transcript_open", "summary", 1);
@ -227,7 +228,7 @@ const chatTranscriptRule = {
let messagesToken = state.push("div_chat_transcript_messages", "div", 1);
messagesToken.attrs = [["class", "chat-transcript-messages"]];
if (threadId) {
if (isThread) {
const regex = /\[chat/i;
const match = regex.exec(content);