New websocket protocol

This commit is contained in:
lilia 2014-11-14 17:48:57 -08:00
parent 9364cee578
commit 7f04439b37
6 changed files with 87 additions and 24 deletions

View file

@ -38,7 +38,7 @@
},
sendMessage: function(message, attachments) {
encodeAttachments(attachments).then(function(base64_attachments) {
return encodeAttachments(attachments).then(function(base64_attachments) {
var timestamp = Date.now();
this.messages().add({ type: 'outgoing',
body: message,
@ -155,7 +155,7 @@
addIncomingMessage: function(decrypted) {
var thread = Whisper.Threads.findOrCreateForIncomingMessage(decrypted);
thread.receiveMessage(decrypted);
return thread.receiveMessage(decrypted);
}
}))();
})();