Guard against notifying for errors on non-existent SMS threads.

All of the other send jobs do this already, just didn't do it here.
This commit is contained in:
Greyson Parrelli 2018-10-31 08:19:33 -07:00
parent cfeee25488
commit 532431b0ad

View File

@ -89,7 +89,10 @@ public class SmsSendJob extends SendJob {
Recipient recipient = DatabaseFactory.getThreadDatabase(context).getRecipientForThreadId(threadId);
DatabaseFactory.getSmsDatabase(context).markAsSentFailed(messageId);
MessageNotifier.notifyMessageDeliveryFailed(context, recipient, threadId);
if (threadId != -1 && recipient != null) {
MessageNotifier.notifyMessageDeliveryFailed(context, recipient, threadId);
}
}
private void deliver(SmsMessageRecord message)