@ -1073,7 +1073,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
@NonNull Optional < Long > smsMessageId , @NonNull Throwable e )
{
SmsDatabase smsDatabase = DatabaseFactory . getSmsDatabase ( context ) ;
if ( SessionMetaProtocol . shouldErrorMessageShow ( context , timestamp ) ) {
if ( ! smsMessageId . isPresent ( ) ) {
Optional < InsertResult > insertResult = insertPlaceholder ( sender , senderDevice , timestamp ) ;
@ -1084,6 +1084,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
} else {
smsDatabase . markAsDecryptFailed ( smsMessageId . get ( ) ) ;
}
}
// FIXME: This is a temporary patch for bad mac issues. At least with this people will be able to message again. We have to figure out the root cause of the issue though.
if ( e . getCause ( ) ! = null ) {
@ -1100,14 +1101,14 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
}
}
SessionManagementProtocol . triggerSessionRestorationUI ( context , sender );
SessionManagementProtocol . triggerSessionRestorationUI ( context , sender , timestamp );
}
private void handleNoSessionMessage ( @NonNull String sender , int senderDevice , long timestamp ,
@NonNull Optional < Long > smsMessageId )
{
SmsDatabase smsDatabase = DatabaseFactory . getSmsDatabase ( context ) ;
if ( SessionMetaProtocol . shouldErrorMessageShow ( context , timestamp ) ) {
if ( ! smsMessageId . isPresent ( ) ) {
Optional < InsertResult > insertResult = insertPlaceholder ( sender , senderDevice , timestamp ) ;
@ -1118,7 +1119,8 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
} else {
smsDatabase . markAsNoSession ( smsMessageId . get ( ) ) ;
}
SessionManagementProtocol . triggerSessionRestorationUI ( context , sender ) ;
}
SessionManagementProtocol . triggerSessionRestorationUI ( context , sender , timestamp ) ;
}
private void handleLegacyMessage ( @NonNull String sender , int senderDevice , long timestamp ,