diff --git a/index.html b/index.html
index f1f8ddd..430815d 100644
--- a/index.html
+++ b/index.html
@@ -12,7 +12,7 @@
function sendMsg() {
msg = document.getElementById("input").value;
- window.webxdc.sendUpdate({"name": window.webxdc.selfName(), "msg": msg}, 'someone typed "'+msg+'"');
+ window.webxdc.sendUpdate({payload: {name: window.webxdc.selfName(), msg: msg}}, 'someone typed "'+msg+'"');
}
function receiveUpdate(update) {
diff --git a/webxdc.js b/webxdc.js
index 4e88cce..67894b9 100644
--- a/webxdc.js
+++ b/webxdc.js
@@ -27,9 +27,9 @@ window.webxdc = (() => {
var updatesJSON = window.localStorage.getItem(updatesKey);
return updatesJSON ? JSON.parse(updatesJSON) : [];
},
- sendUpdate: (payload, description) => {
+ sendUpdate: (update, description) => {
// alert(description+"\n\n"+JSON.stringify(payload));
- var update = {payload: payload};
+ update = {payload: update.payload, summary: update.summary, info: update.info}
console.log('[Webxdc] description="' + description + '", ' + JSON.stringify(update));
updateListener(update);
var updatesJSON = window.localStorage.getItem(updatesKey);