mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-23 20:29:10 +00:00
Save the SMS setting on a per-conversation basis.
This commit is contained in:

committed by
Greyson Parrelli

parent
11a2ed0743
commit
9c40de5bf1
@@ -284,6 +284,8 @@ public class PushDecryptJob extends ContextJob {
|
||||
Log.w(TAG, "Got unrecognized message...");
|
||||
}
|
||||
|
||||
resetRecipientToPush(Recipient.from(context, Address.fromExternal(context, content.getSender()), false));
|
||||
|
||||
if (envelope.isPreKeySignalMessage()) {
|
||||
ApplicationContext.getInstance(context).getJobManager().add(new RefreshPreKeysJob(context));
|
||||
}
|
||||
@@ -1163,6 +1165,12 @@ public class PushDecryptJob extends ContextJob {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void resetRecipientToPush(@NonNull Recipient recipient) {
|
||||
if (recipient.isForceSmsSelection()) {
|
||||
DatabaseFactory.getRecipientDatabase(context).setForceSmsSelection(recipient, false);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
private static class StorageFailedException extends Exception {
|
||||
private final String sender;
|
||||
|
Reference in New Issue
Block a user