mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:27:39 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user