From 2176b7ee396f403bcefc87995bd437975c0ef0aa Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Wed, 7 Dec 2022 01:59:30 -0500 Subject: [PATCH] Revise example of `machine.receiveSyncChanges` Clarify that the JSON-encoded `toDeviceEvents` passed to `OlmMachine.receiveSyncChanges` must be the list of events themselves, instead of a wrapper object that contains the event list. Signed-off-by: Andrew Ferrazzutti --- bindings/matrix-sdk-crypto-nodejs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/matrix-sdk-crypto-nodejs/README.md b/bindings/matrix-sdk-crypto-nodejs/README.md index c55024c7c..51bed6f2e 100644 --- a/bindings/matrix-sdk-crypto-nodejs/README.md +++ b/bindings/matrix-sdk-crypto-nodejs/README.md @@ -140,7 +140,7 @@ async function main() { // Let's pretend we have received changes and events from a // `/sync` endpoint of a Matrix homeserver, … - const toDeviceEvents = "{}"; // JSON-encoded + const toDeviceEvents = "[]"; // JSON-encoded list of events const changedDevices = new DeviceLists(); const oneTimeKeyCounts = {}; const unusedFallbackKeys = [];