Closes #913: Message ID is -1 when called in aggregate

This commit is contained in:
Manuel 2014-03-04 23:36:50 +01:00 committed by Moxie Marlinspike
parent 37c9fb7cd1
commit b6a9eb5bf2

View File

@ -88,13 +88,13 @@ public class SmsSender {
Log.w("SmsSender", e);
IncomingIdentityUpdateMessage identityUpdateMessage = IncomingIdentityUpdateMessage.createFor(e.getE164Number(), e.getIdentityKey());
DatabaseFactory.getEncryptingSmsDatabase(context).insertMessageInbox(masterSecret, identityUpdateMessage);
DatabaseFactory.getSmsDatabase(context).markAsSentFailed(messageId);
DatabaseFactory.getSmsDatabase(context).markAsSentFailed(record.getId());
} catch (UndeliverableMessageException ude) {
Log.w("SmsSender", ude);
DatabaseFactory.getSmsDatabase(context).markAsSentFailed(messageId);
DatabaseFactory.getSmsDatabase(context).markAsSentFailed(record.getId());
} catch (RetryLaterException rle) {
Log.w("SmsSender", rle);
DatabaseFactory.getSmsDatabase(context).markAsOutbox(messageId);
DatabaseFactory.getSmsDatabase(context).markAsOutbox(record.getId());
if (systemStateListener.isConnected()) scheduleQuickRetryAlarm();
else systemStateListener.registerForConnectivityChange();
}