diff options
author | Vitaly Takmazov | 2024-10-25 07:27:27 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-10-25 07:27:27 +0300 |
commit | 353e7b8849fa6d76927c695f2bc085e0b44e22f2 (patch) | |
tree | b8115cda547867486c1be8b850c6208a3a824447 /vnext/server/common | |
parent | 2ea1de77ab4851f8024c546d9f14bb84d47a1d3e (diff) |
vnext: fix message formatting for Telegram
Diffstat (limited to 'vnext/server/common')
-rw-r--r-- | vnext/server/common/MessageUtils.js | 5 |
1 files changed, 3 insertions, 2 deletions
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 ? `<blockquote>${msg.replyQuote.substring(1)}</blockquote>` : msg.replyQuote : '' } else if (isPM(msg)) { return '' } |