Use isPrivate helper
// FREEBIE
This commit is contained in:
parent
d6d1a7da55
commit
3bd9108f6e
1 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// hack
|
// hack
|
||||||
if (this.get('type') === 'private') {
|
if (this.isPrivate()) {
|
||||||
try {
|
try {
|
||||||
this.id = libphonenumber.util.verifyNumber(this.id);
|
this.id = libphonenumber.util.verifyNumber(this.id);
|
||||||
var number = libphonenumber.util.splitCountryCode(this.id);
|
var number = libphonenumber.util.splitCountryCode(this.id);
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
endSession: function() {
|
endSession: function() {
|
||||||
if (this.get('type') === 'private') {
|
if (this.isPrivate()) {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
var message = this.messageCollection.add({
|
var message = this.messageCollection.add({
|
||||||
conversationId : this.id,
|
conversationId : this.id,
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
getNumber: function() {
|
getNumber: function() {
|
||||||
if (this.get('type') === 'private') {
|
if (this.isPrivate()) {
|
||||||
return this.id;
|
return this.id;
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
|
|
Loading…
Reference in a new issue