fix(broker): plain text push messages, mesh slug in push label
Some checks failed
CI / Typecheck (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-10 02:27:22 +01:00
parent a022da1998
commit dbea96960f

View File

@@ -649,12 +649,12 @@ function createPushHandler(bot: Bot) {
const chatIds = meshChats.get(meshId);
if (!chatIds || chatIds.size === 0) return;
const meshLabel = meshId.slice(0, 12);
const formatted = `💬 *[${meshLabel}] ${escapeMarkdown(from)}*\n${escapeMarkdown(text)}`;
const meshLabel = meshSlugs.get(meshId) ?? meshId.slice(0, 12);
const formatted = `💬 [${meshLabel}] ${from}\n${text}`;
for (const chatId of chatIds) {
bot.api
.sendMessage(chatId, formatted, { parse_mode: "Markdown" })
.sendMessage(chatId, formatted)
.catch((e) => {
console.error(`[tg-bridge] send to chat ${chatId} failed:`, e.message);
});