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 <noreply@anthropic.com>
This commit is contained in:
parent
06289b36da
commit
b93ab0ddf6
@ -90,7 +90,7 @@ export async function sendMessageNextcloudTalk(
|
||||
const bodyStr = JSON.stringify(body);
|
||||
|
||||
const { random, signature } = generateNextcloudTalkSignature({
|
||||
body: bodyStr,
|
||||
body: message,
|
||||
secret,
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user