AppWarp onPrivateUpdateReceived doesn't work

32 views Asked by At
var codestring = this.ball + " " + this.ball.position["x"] + " " 
                 + this.ball.position["y"];  
_warpclient.sendPrivateUpdatePeers(enemy, codestring);

I use this function to send peers to the person with defined name enemy.

function onSendPrivateUpdateDone (result){
    console.log('Update done ' + result);
}

onSendPrivateUpdateDone works and write messages to person who send peers, here https://apphq.shephertz.com/appWarp/index#/testManager it's noted that my messages are sent, room is created and players are connected to the room, but the person who must accept message doesn't do that, because function onPrivateUpdateReceived callback does nothing.

onPrivateUpdateReceived(userName, msg){
    console.log("Username: "+userName);
    console.log("Message: "+msg);
}
1

There are 1 answers

0
Programing On

onPrivateUpdateReceived recieves msgs from the tosendPrivateUpdate method, you should change sendPrivateUpdatePeers to sendPrivateUpdate to work.