From b93ab0ddf6d812700ecf6f019925d79db2f6377a Mon Sep 17 00:00:00 2001 From: Markus Klein Date: Thu, 29 Jan 2026 17:45:56 +0100 Subject: [PATCH] fix(nextcloud-talk): calculate signature over message text, not JSON body NextCloud Talk's Bot API expects the HMAC signature to be calculated over `random + message` (just the message text), not over the entire JSON body `random + {"message":"..."}`. This fix changes the signature calculation to use the plain message text while keeping the HTTP request body as JSON. Fixes authentication errors when bots try to send responses: "Nextcloud Talk: authentication failed - check bot secret" Closes #4073 Co-Authored-By: Claude Opus 4.5 --- extensions/nextcloud-talk/src/send.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/nextcloud-talk/src/send.ts b/extensions/nextcloud-talk/src/send.ts index 1dd8f5094..00d22fa64 100644 --- a/extensions/nextcloud-talk/src/send.ts +++ b/extensions/nextcloud-talk/src/send.ts @@ -90,7 +90,7 @@ export async function sendMessageNextcloudTalk( const bodyStr = JSON.stringify(body); const { random, signature } = generateNextcloudTalkSignature({ - body: bodyStr, + body: message, secret, });