mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
fix(discord): reuse nonces after lost responses
A successful create may lose its response. Reuse a stable nonce with enforce_nonce so retries recover that message instead of posting duplicates or accepting an unreadable success.
This commit is contained in:
1 parent
966403bdc1
commit
7cf507f654
3 files changed
+28
-11
No files matched your search
@@ -12,7 +12,13 @@ export class DiscordDriver implements PlatformDriver {
|
||||
return { ok: false, error: "target.channelId is required", errorCode: "NO_TARGET" };
|
||||
}
|
||||
const token = env.DISCORD_TOKEN ?? "";
|
||||
return sendMessage(token, channelId, renderNeutralMessage(message), target.threadId);
|
||||
return sendMessage(
|
||||
token,
|
||||
channelId,
|
||||
renderNeutralMessage(message),
|
||||
target.threadId,
|
||||
message.sendKey,
|
||||
);
|
||||
}
|
||||
|
||||
async edit(
|
||||
|
||||
Reference in new issue
Block a user