mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 22:18:27 +00:00
fix: restore discord owner hint from allowlists
This commit is contained in:
@@ -50,6 +50,7 @@ import {
|
||||
normalizeDiscordSlug,
|
||||
resolveDiscordChannelConfigWithFallback,
|
||||
resolveDiscordGuildEntry,
|
||||
resolveDiscordOwnerAllowFrom,
|
||||
resolveDiscordUserAllowed,
|
||||
} from "./allow-list.js";
|
||||
import { resolveDiscordChannelInfo } from "./message-utils.js";
|
||||
@@ -741,6 +742,11 @@ async function dispatchDiscordCommandInteraction(params: {
|
||||
parentPeer: threadParentId ? { kind: "channel", id: threadParentId } : undefined,
|
||||
});
|
||||
const conversationLabel = isDirectMessage ? (user.globalName ?? user.username) : channelId;
|
||||
const ownerAllowFrom = resolveDiscordOwnerAllowFrom({
|
||||
channelConfig,
|
||||
guildInfo,
|
||||
sender: { id: sender.id, name: sender.name, tag: sender.tag },
|
||||
});
|
||||
const ctxPayload = finalizeInboundContext({
|
||||
Body: prompt,
|
||||
RawBody: prompt,
|
||||
@@ -778,6 +784,7 @@ async function dispatchDiscordCommandInteraction(params: {
|
||||
return untrustedChannelMetadata ? [untrustedChannelMetadata] : undefined;
|
||||
})()
|
||||
: undefined,
|
||||
OwnerAllowFrom: ownerAllowFrom,
|
||||
SenderName: user.globalName ?? user.username,
|
||||
SenderId: user.id,
|
||||
SenderUsername: user.username,
|
||||
|
||||
Reference in New Issue
Block a user