mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 09:22:23 +00:00
Fix note to self message syncing.
Don't send messages if we're sending to ourselves, instead we just send a regular sync message.
This commit is contained in:
@@ -269,6 +269,14 @@ public class MessageSender {
|
||||
jobManager.add(new PushTextSendJob(messageId, recipient.getAddress()));
|
||||
return;
|
||||
}
|
||||
|
||||
// Note to self
|
||||
boolean isNoteToSelf = MultiDeviceUtilitiesKt.isOneOfOurDevices(context, recipient.getAddress());
|
||||
if (isNoteToSelf) {
|
||||
jobManager.add(new PushTextSendJob(messageId, recipient.getAddress()));
|
||||
return;
|
||||
}
|
||||
|
||||
boolean[] hasSentSyncMessage = { false };
|
||||
|
||||
MultiDeviceUtilitiesKt.getAllDevicePublicKeys(context, recipientPublicKey, storageAPI, (devicePublicKey, isFriend, friendCount) -> {
|
||||
@@ -305,6 +313,13 @@ public class MessageSender {
|
||||
return;
|
||||
}
|
||||
|
||||
// Note to self
|
||||
boolean isNoteToSelf = MultiDeviceUtilitiesKt.isOneOfOurDevices(context, recipient.getAddress());
|
||||
if (isNoteToSelf) {
|
||||
jobManager.add(new PushTextSendJob(messageId, recipient.getAddress()));
|
||||
return;
|
||||
}
|
||||
|
||||
boolean[] hasSentSyncMessage = { false };
|
||||
|
||||
MultiDeviceUtilitiesKt.getAllDevicePublicKeys(context, recipientPublicKey, storageAPI, (devicePublicKey, isFriend, friendCount) -> {
|
||||
|
||||
Reference in New Issue
Block a user