mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 07:48:57 +00:00
Merge pull request #767 from PR0M3TH3AN/codex/streamline-nostr-sync-notifications
Fix inconsistent Nostr sync notifications
This commit is contained in:
@@ -399,7 +399,6 @@ class EncryptionManager:
|
|||||||
self.save_json_data(data, relative_path) # This always saves in V2 format
|
self.save_json_data(data, relative_path) # This always saves in V2 format
|
||||||
self.update_checksum(relative_path)
|
self.update_checksum(relative_path)
|
||||||
logger.info("Index file from Nostr was processed and saved successfully.")
|
logger.info("Index file from Nostr was processed and saved successfully.")
|
||||||
print(colored("Index file updated from Nostr successfully.", "green"))
|
|
||||||
self.last_migration_performed = is_legacy
|
self.last_migration_performed = is_legacy
|
||||||
return True
|
return True
|
||||||
except InvalidToken as e:
|
except InvalidToken as e:
|
||||||
|
@@ -1380,6 +1380,7 @@ class PasswordManager:
|
|||||||
)
|
)
|
||||||
if updated:
|
if updated:
|
||||||
logger.info("Local database synchronized from Nostr.")
|
logger.info("Local database synchronized from Nostr.")
|
||||||
|
self.notify("Index file updated from Nostr successfully.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Unable to sync index from Nostr relays %s: %s",
|
"Unable to sync index from Nostr relays %s: %s",
|
||||||
@@ -1540,6 +1541,7 @@ class PasswordManager:
|
|||||||
if migrated and not getattr(self, "offline_mode", False):
|
if migrated and not getattr(self, "offline_mode", False):
|
||||||
self.start_background_vault_sync()
|
self.start_background_vault_sync()
|
||||||
logger.info("Initialized local database from Nostr.")
|
logger.info("Initialized local database from Nostr.")
|
||||||
|
self.notify("Index file updated from Nostr successfully.")
|
||||||
except Exception as e: # pragma: no cover - network errors
|
except Exception as e: # pragma: no cover - network errors
|
||||||
logger.warning(f"Unable to sync index from Nostr: {e}")
|
logger.warning(f"Unable to sync index from Nostr: {e}")
|
||||||
finally:
|
finally:
|
||||||
@@ -4154,7 +4156,6 @@ class PasswordManager:
|
|||||||
try:
|
try:
|
||||||
self.vault.decrypt_and_save_index_from_nostr(encrypted_data, merge=True)
|
self.vault.decrypt_and_save_index_from_nostr(encrypted_data, merge=True)
|
||||||
logging.info("Index file updated from Nostr successfully.")
|
logging.info("Index file updated from Nostr successfully.")
|
||||||
print(colored("Index file updated from Nostr successfully.", "green"))
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(
|
logging.error(
|
||||||
f"Failed to decrypt and save data from Nostr: {e}", exc_info=True
|
f"Failed to decrypt and save data from Nostr: {e}", exc_info=True
|
||||||
|
Reference in New Issue
Block a user