Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Guard contact creation across session changes

Neeraj Gupta17b3c8d7c65e
diff --git a/mobile/apps/photos/lib/services/photos_contacts_service.dart b/mobile/apps/photos/lib/services/photos_contacts_service.dart
index 0303030504..3122e4c0c5 100644
--- a/mobile/apps/photos/lib/services/photos_contacts_service.dart
+++ b/mobile/apps/photos/lib/services/photos_contacts_service.dart
@@ -263,6 +263,9 @@ class PhotosContactsService {
required Uint8List bytes,
}) async {
final contactsService = await _ensureReadyForWrite();
+ if (!identical(contactsService, _activeContactsOrNull())) {
+ return null;
+ }
final generation = _sessionGeneration;
final existing = await contactsService.getContactByUserId(
contactUserId,