aboutsummaryrefslogtreecommitdiff
path: root/vnext/server/common
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-10-25 07:27:27 +0300
committerGravatar Vitaly Takmazov2024-10-25 07:27:27 +0300
commit353e7b8849fa6d76927c695f2bc085e0b44e22f2 (patch)
treeb8115cda547867486c1be8b850c6208a3a824447 /vnext/server/common
parent2ea1de77ab4851f8024c546d9f14bb84d47a1d3e (diff)
vnext: fix message formatting for Telegram
Diffstat (limited to 'vnext/server/common')
-rw-r--r--vnext/server/common/MessageUtils.js5
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 ''
}