Help desk in Telegram: @CTBTickets_bot pings with Close/Waiting/High/Open buttons, reply to a ping to answer (/note = internal), /tickets and /t <ref>; secret-header webhook, only Marty's private chat is obeyed; old one-way ping stays as fallback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-16 16:56:54 -05:00
parent 9be58bd5ef
commit 6f6412d908
3 changed files with 117 additions and 2 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ function pingAdmin(kind, t, m) {
if (newPings.skipped) { extra = '\n(+' + newPings.skipped + ' more new tickets earlier were not pinged)'; newPings.skipped = 0; }
}
const text = head + ' · ' + t.platform + ' · ' + escH(t.category) + '\n' + escH(who(t)) + '\n' + escH(t.subject) + '\n“' + escH(firstLine(last.body)) + '”\n' + adminLink(t) + extra;
if (deps.telegram) deps.telegram(text).catch(() => {});
if (deps.telegram) deps.telegram(text, t.ref).catch(() => {});
if (deps.adminEmail && deps.mailer && deps.mailer.hasKey()) {
const body = items.map(i => i.body).join('\n\n---\n\n');
deps.mailer.send(deps.adminEmail, '[' + t.ref + '] ' + (kind === 'new' ? 'New ticket: ' : 'Reply: ') + t.subject,