adapt to recent API changes

master
adbenitez 2022-01-06 19:16:58 -05:00
parent 9b048aebe4
commit 50972ab489
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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);