mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Don't attempt send failure notifications for deleted messages.
Fixes #2963 // FREEBIE
This commit is contained in:
parent
b9541a65b0
commit
1c90b59bb8
@ -22,6 +22,7 @@ import android.database.Cursor;
|
||||
import android.database.MergeCursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@ -371,7 +372,7 @@ public class ThreadDatabase extends Database {
|
||||
}
|
||||
}
|
||||
|
||||
public Recipients getRecipientsForThreadId(long threadId) {
|
||||
public @Nullable Recipients getRecipientsForThreadId(long threadId) {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = null;
|
||||
|
||||
|
@ -92,8 +92,10 @@ public class PushTextSendJob extends PushSendJob implements InjectableType {
|
||||
long threadId = DatabaseFactory.getSmsDatabase(context).getThreadIdForMessage(messageId);
|
||||
Recipients recipients = DatabaseFactory.getThreadDatabase(context).getRecipientsForThreadId(threadId);
|
||||
|
||||
if (threadId != -1 && recipients != null) {
|
||||
MessageNotifier.notifyMessageDeliveryFailed(context, recipients, threadId);
|
||||
}
|
||||
}
|
||||
|
||||
private void deliver(MasterSecret masterSecret, SmsMessageRecord message)
|
||||
throws UntrustedIdentityException, InsecureFallbackApprovalException, RetryLaterException
|
||||
|
Loading…
Reference in New Issue
Block a user