fix(discord): pass hydrated config to ack reactions to fix SecretRef resolution

When extracting `reactMessageDiscord`, it defaulted to reading the raw config (which contains `SecretRef`s) if a hydrated `cfg` was omitted. We now pass the pre-resolved `cfg` context into the reaction options so the plugin SDK resolves the token via memory rather than the raw file.
This commit is contained in:
FunJim
2026-04-03 12:50:47 +08:00
committed by Peter Steinberger
parent 27ced5c1d3
commit b51214ec3e

View File

@@ -202,11 +202,15 @@ export async function processDiscordMessage(
setReaction: async (emoji) => {
await reactMessageDiscord(messageChannelId, message.id, emoji, {
rest: discordRest,
cfg,
accountId,
});
},
removeReaction: async (emoji) => {
await removeReactionDiscord(messageChannelId, message.id, emoji, {
rest: discordRest,
cfg,
accountId,
});
},
};