fix(discord): preserve channel session keys via channel_id fallbacks (#17622)

* fix(discord): preserve channel session keys via channel_id fallbacks

* docs(changelog): add discord session continuity note

* Tests: cover discord channel_id fallback

---------

Co-authored-by: Shadow <hi@shadowing.dev>
This commit is contained in:
Shakker
2026-02-16 02:30:17 +00:00
committed by GitHub
parent 39d5590230
commit 09566b1693
16 changed files with 235 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ import {
import { danger } from "../../globals.js";
import { preflightDiscordMessage } from "./message-handler.preflight.js";
import { processDiscordMessage } from "./message-handler.process.js";
import { resolveDiscordMessageText } from "./message-utils.js";
import { resolveDiscordMessageChannelId, resolveDiscordMessageText } from "./message-utils.js";
type DiscordMessageHandlerParams = Omit<
DiscordMessagePreflightParams,
@@ -31,7 +31,10 @@ export function createDiscordMessageHandler(
if (!message || !authorId) {
return null;
}
const channelId = message.channelId;
const channelId = resolveDiscordMessageChannelId({
message,
eventChannelId: entry.data.channel_id,
});
if (!channelId) {
return null;
}