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 <andrewf@element.io>
This commit is contained in:
Andrew Ferrazzutti
2022-12-07 01:59:30 -05:00
committed by Damir Jelić
parent f5b59c3de2
commit 2176b7ee39

View File

@@ -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 = [];