From 353e7b8849fa6d76927c695f2bc085e0b44e22f2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 25 Oct 2024 07:27:27 +0300 Subject: vnext: fix message formatting for Telegram --- vnext/server/common/MessageUtils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vnext/server/common') diff --git a/vnext/server/common/MessageUtils.js b/vnext/server/common/MessageUtils.js index bb3d791f..d3c6a0f5 100644 --- a/vnext/server/common/MessageUtils.js +++ b/vnext/server/common/MessageUtils.js @@ -39,11 +39,12 @@ export function formatTitle(msg) { /** * format notification quote * @param { import('../../src/api').Message } msg message + * @param { boolean } isDurov format to Telegram markup * @returns {string} formatted quote line */ -export function formatQuote(msg) { +export function formatQuote(msg, isDurov = false) { if (isReply(msg)) { - return msg.replyQuote || '' + return msg.replyQuote ? isDurov ? `
${msg.replyQuote.substring(1)}
` : msg.replyQuote : '' } else if (isPM(msg)) { return '' } -- cgit v1.2.3