Fix subscribeToPush is not defined

This commit is contained in:
lilia 2014-05-17 14:15:06 -07:00
parent ed3aa9667d
commit 170257dafb

View file

@ -449,13 +449,13 @@ window.textsecure.subscribeToPush = function() {
console.log('Server is down :('); console.log('Server is down :(');
clearInterval(pingInterval); clearInterval(pingInterval);
subscribeToPushMessageSemaphore--; subscribeToPushMessageSemaphore--;
setTimeout(function() { subscribeToPush(message_callback); }, 60000); setTimeout(function() { textsecure.subscribeToPush(message_callback); }, 60000);
}; };
socket.onclose = function(socketEvent) { socket.onclose = function(socketEvent) {
console.log('Server closed :('); console.log('Server closed :(');
clearInterval(pingInterval); clearInterval(pingInterval);
subscribeToPushMessageSemaphore--; subscribeToPushMessageSemaphore--;
setTimeout(function() { subscribeToPush(message_callback); }, 60000); setTimeout(function() { textsecure.subscribeToPush(message_callback); }, 60000);
}; };
socket.onopen = function(socketEvent) { socket.onopen = function(socketEvent) {
console.log('Connected to server!'); console.log('Connected to server!');