fix(telegram): honor session activation overrides

This commit is contained in:
Peter Steinberger
2026-01-07 11:19:09 +00:00
parent 3cbced01fa
commit 4bd7ca305a
2 changed files with 2 additions and 10 deletions

View File

@@ -48,6 +48,7 @@
- Telegram: include sender identity in group envelope headers. (#336) - Telegram: include sender identity in group envelope headers. (#336)
- Telegram: support forum topics with topic-isolated sessions and message_thread_id routing. Thanks @HazAT, @nachoiacovino, @RandyVentures for PR #321/#333/#334. - Telegram: support forum topics with topic-isolated sessions and message_thread_id routing. Thanks @HazAT, @nachoiacovino, @RandyVentures for PR #321/#333/#334.
- Telegram: add draft streaming via `sendMessageDraft` with `telegram.streamMode`, plus `/reasoning stream` for draft-only reasoning. - Telegram: add draft streaming via `sendMessageDraft` with `telegram.streamMode`, plus `/reasoning stream` for draft-only reasoning.
- Telegram: honor `/activation` session mode for group mention gating and clarify group activation docs. Thanks @julianengel for PR #377.
- iMessage: ignore disconnect errors during shutdown (avoid unhandled promise rejections). Thanks @antons for PR #359. - iMessage: ignore disconnect errors during shutdown (avoid unhandled promise rejections). Thanks @antons for PR #359.
- Messages: stop defaulting ack reactions to 👀 when identity emoji is missing. - Messages: stop defaulting ack reactions to 👀 when identity emoji is missing.
- Auto-reply: require slash for control commands to avoid false triggers in normal text. - Auto-reply: require slash for control commands to avoid false triggers in normal text.

View File

@@ -860,7 +860,7 @@ export function createTelegramBot(opts: TelegramBotOptions) {
kind: isGroup ? "group" : "dm", kind: isGroup ? "group" : "dm",
id: isGroup id: isGroup
? buildTelegramGroupPeerId(chatId, messageThreadId) ? buildTelegramGroupPeerId(chatId, messageThreadId)
: buildTelegramDmPeerId(chatId, messageThreadId), : String(chatId),
}, },
}); });
const skillFilter = firstDefined( const skillFilter = firstDefined(
@@ -1251,15 +1251,6 @@ function buildTelegramGroupPeerId(
: String(chatId); : String(chatId);
} }
function buildTelegramDmPeerId(
chatId: number | string,
messageThreadId?: number,
) {
return messageThreadId != null
? `${chatId}:topic:${messageThreadId}`
: String(chatId);
}
function buildTelegramGroupFrom( function buildTelegramGroupFrom(
chatId: number | string, chatId: number | string,
messageThreadId?: number, messageThreadId?: number,