mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-27 09:27:54 +00:00
Fix issue with Signal join notifications.
This commit is contained in:
@@ -252,6 +252,8 @@ public class DirectoryHelper {
|
|||||||
|
|
||||||
stopwatch.split("handle-unlisted");
|
stopwatch.split("handle-unlisted");
|
||||||
|
|
||||||
|
Set<RecipientId> preExistingRegisteredUsers = new HashSet<>(recipientDatabase.getRegistered());
|
||||||
|
|
||||||
recipientDatabase.bulkUpdatedRegisteredStatus(uuidMap, inactiveIds);
|
recipientDatabase.bulkUpdatedRegisteredStatus(uuidMap, inactiveIds);
|
||||||
|
|
||||||
stopwatch.split("update-registered");
|
stopwatch.split("update-registered");
|
||||||
@@ -265,14 +267,13 @@ public class DirectoryHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (TextSecurePreferences.hasSuccessfullyRetrievedDirectory(context) && notifyOfNewUsers) {
|
if (TextSecurePreferences.hasSuccessfullyRetrievedDirectory(context) && notifyOfNewUsers) {
|
||||||
Set<RecipientId> existingSignalIds = new HashSet<>(recipientDatabase.getRegistered());
|
Set<RecipientId> systemContacts = new HashSet<>(recipientDatabase.getSystemContacts());
|
||||||
Set<RecipientId> existingSystemIds = new HashSet<>(recipientDatabase.getSystemContacts());
|
Set<RecipientId> newlyRegisteredSystemContacts = new HashSet<>(activeIds);
|
||||||
Set<RecipientId> newlyActiveIds = new HashSet<>(activeIds);
|
|
||||||
|
|
||||||
newlyActiveIds.removeAll(existingSignalIds);
|
newlyRegisteredSystemContacts.removeAll(preExistingRegisteredUsers);
|
||||||
newlyActiveIds.retainAll(existingSystemIds);
|
newlyRegisteredSystemContacts.retainAll(systemContacts);
|
||||||
|
|
||||||
notifyNewUsers(context, newlyActiveIds);
|
notifyNewUsers(context, newlyRegisteredSystemContacts);
|
||||||
} else {
|
} else {
|
||||||
TextSecurePreferences.setHasSuccessfullyRetrievedDirectory(context, true);
|
TextSecurePreferences.setHasSuccessfullyRetrievedDirectory(context, true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user