diff --git a/index.html b/index.html index 753ec18..f1f8ddd 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ function sendMsg() { msg = document.getElementById("input").value; - window.webxdc.sendUpdate('someone typed "'+msg+'"', {"name": window.webxdc.selfName(), "msg": msg}); + window.webxdc.sendUpdate({"name": window.webxdc.selfName(), "msg": msg}, 'someone typed "'+msg+'"'); } function receiveUpdate(update) { diff --git a/webxdc.js b/webxdc.js index 8ccc8c6..c90a4ad 100644 --- a/webxdc.js +++ b/webxdc.js @@ -25,7 +25,7 @@ window.webxdc = (() => { var updatesJSON = window.localStorage.getItem(updatesKey); return updatesJSON ? JSON.parse(updatesJSON) : []; }, - sendUpdate: (description, payload) => { + sendUpdate: (payload, description) => { // alert(description+"\n\n"+JSON.stringify(payload)); var update = {payload: payload}; updateListener(update);