mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 21:53:43 +00:00
fix(discord): fallback thread parent lookup when parentId missing
This commit is contained in:
committed by
Peter Steinberger
parent
fd24b35449
commit
d883ecade6
@@ -131,8 +131,12 @@ export async function resolveDiscordThreadParentInfo(params: {
|
||||
channelInfo: import("./message-utils.js").DiscordChannelInfo | null;
|
||||
}): Promise<DiscordThreadParentInfo> {
|
||||
const { threadChannel, channelInfo, client } = params;
|
||||
const parentId =
|
||||
let parentId =
|
||||
threadChannel.parentId ?? threadChannel.parent?.id ?? channelInfo?.parentId ?? undefined;
|
||||
if (!parentId && threadChannel.id) {
|
||||
const threadInfo = await resolveDiscordChannelInfo(client, threadChannel.id);
|
||||
parentId = threadInfo?.parentId ?? undefined;
|
||||
}
|
||||
if (!parentId) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user