@ -258,7 +258,9 @@
}
}
} ,
} ,
resolveConflicts : function ( number ) {
resolveConflicts : function ( conflict ) {
var number = conflict . number ;
var identityKey = conflict . identityKey ;
if ( this . isPrivate ( ) ) {
if ( this . isPrivate ( ) ) {
number = this . id ;
number = this . id ;
} else if ( ! _ . include ( this . get ( 'members' ) , number ) ) {
} else if ( ! _ . include ( this . get ( 'members' ) , number ) ) {
@ -270,12 +272,14 @@
}
}
return textsecure . storage . axolotl . removeIdentityKey ( number ) . then ( function ( ) {
return textsecure . storage . axolotl . removeIdentityKey ( number ) . then ( function ( ) {
return textsecure . storage . axolotl . putIdentityKey ( number , identityKey ) . then ( function ( ) {
this . messageCollection . each ( function ( message ) {
this . messageCollection . each ( function ( message ) {
if ( message . hasKeyConflict ( number ) ) {
if ( message . hasKeyConflict ( number ) ) {
message . resolveConflict ( number ) ;
message . resolveConflict ( number ) ;
}
}
} ) ;
} ) ;
} . bind ( this ) ) ;
} . bind ( this ) ) ;
} . bind ( this ) ) ;
} ,
} ,
hashCode : function ( ) {
hashCode : function ( ) {
if ( this . hash === undefined ) {
if ( this . hash === undefined ) {