Fix whitespace, lint
This commit is contained in:
parent
ebf1b3352f
commit
c6b79236d9
1 changed files with 10 additions and 7 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: ts=2:sw=2:expandtab: */
|
||||||
var Whisper = Whisper || {};
|
var Whisper = Whisper || {};
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
@ -20,10 +21,12 @@ var Whisper = Whisper || {};
|
||||||
|
|
||||||
sendMessage: function(message) {
|
sendMessage: function(message) {
|
||||||
var m = Whisper.Messages.addOutgoingMessage(message, this);
|
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, []);
|
var promise = textsecure.messaging.sendMessageToNumber(this.get('id'), message, []);
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
var promise = textsecure.messaging.sendMessageToGroup(this.get('id'), message, []);
|
var promise = textsecure.messaging.sendMessageToGroup(this.get('id'), message, []);
|
||||||
|
}
|
||||||
promise.then(
|
promise.then(
|
||||||
function(result) {
|
function(result) {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
|
@ -54,11 +57,11 @@ var Whisper = Whisper || {};
|
||||||
|
|
||||||
findOrCreateForRecipient: function(recipient) {
|
findOrCreateForRecipient: function(recipient) {
|
||||||
var attributes = {};
|
var attributes = {};
|
||||||
attributes = {
|
attributes = {
|
||||||
id : recipient,
|
id : recipient,
|
||||||
name : recipient,
|
name : recipient,
|
||||||
type : 'private',
|
type : 'private',
|
||||||
};
|
};
|
||||||
return this.findOrCreate(attributes);
|
return this.findOrCreate(attributes);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue