@ -47,7 +47,6 @@
body : message ,
body : message ,
timestamp : timestamp ,
timestamp : timestamp ,
conversationId : this . id ,
conversationId : this . id ,
conversationType : this . get ( 'type' ) ,
type : 'outgoing' ,
type : 'outgoing' ,
attachments : attachments ,
attachments : attachments ,
} ) . save ( ) ;
} ) . save ( ) ;
@ -68,13 +67,12 @@
var conversation = this ;
var conversation = this ;
var timestamp = decrypted . pushMessage . timestamp . toNumber ( ) ;
var timestamp = decrypted . pushMessage . timestamp . toNumber ( ) ;
var m = this . messageCollection . add ( {
var m = this . messageCollection . add ( {
body : decrypted . message . body ,
body : decrypted . message . body ,
timestamp : timestamp ,
timestamp : timestamp ,
conversationId : this . id ,
conversationId : this . id ,
conversationType : this . get ( 'type' ) ,
attachments : decrypted . message . attachments ,
attachments : decrypted . message . attachments ,
type : 'incoming' ,
type : 'incoming' ,
sender : decrypted . pushMessage . source
sender : decrypted . pushMessage . source
} ) ;
} ) ;
if ( timestamp > this . get ( 'timestamp' ) ) {
if ( timestamp > this . get ( 'timestamp' ) ) {