Fix whitespace, lint

This commit is contained in:
lilia 2014-06-07 18:05:11 -07:00
parent ebf1b3352f
commit c6b79236d9
1 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,4 @@
/* vim: ts=2:sw=2:expandtab: */
var Whisper = Whisper || {};
(function () {
@ -20,10 +21,12 @@ var Whisper = Whisper || {};
sendMessage: function(message) {
var m = Whisper.Messages.addOutgoingMessage(message, this);
if (this.get('type') == 'private')
if (this.get('type') == 'private') {
var promise = textsecure.messaging.sendMessageToNumber(this.get('id'), message, []);
else
}
else {
var promise = textsecure.messaging.sendMessageToGroup(this.get('id'), message, []);
}
promise.then(
function(result) {
console.log(result);
@ -54,11 +57,11 @@ var Whisper = Whisper || {};
findOrCreateForRecipient: function(recipient) {
var attributes = {};
attributes = {
id : recipient,
name : recipient,
type : 'private',
};
attributes = {
id : recipient,
name : recipient,
type : 'private',
};
return this.findOrCreate(attributes);
},