Prioritize User Data Sync (Blocklists, DMs) over Video Feed

* Boost DM decryption priority to HIGH in `nostrClient` to match other critical user data.
* Enforce blocking in `handleAuthLogin` to await initial DM sync before refreshing the main video feed.
* This ensures users see their personal data (blocks, messages) correctly loaded before the public feed appears, improving the perception of consistency.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-01-28 17:23:13 +00:00
1 parent a4c5afe699
commit 64fa5d4cb3
2 files changed
+24 -2

No files matched your search

+13
View File
@@ -3271,6 +3271,19 @@ class Application {
error,
);
}
try {
await this.nostrService.loadDirectMessages({
actorPubkey: activePubkey,
limit: 50,
initialLoad: true,
});
} catch (error) {
devLogger.warn(
"[Application] Failed to sync direct messages during login:",
error,
);
}
}
try {
+11 -2
View File
@@ -139,6 +139,7 @@ import {
import {
DEFAULT_NIP07_ENCRYPTION_METHODS,
DEFAULT_NIP07_PERMISSION_METHODS,
NIP07_PRIORITY,
clearStoredNip07Permissions,
normalizePermissionMethod,
readStoredNip07Permissions,
@@ -4514,7 +4515,11 @@ export class NostrClient {
) {
addCandidate(
"nip44",
activeSigner.nip44Decrypt.bind(activeSigner),
(pubkey, ciphertext, options) =>
activeSigner.nip44Decrypt(pubkey, ciphertext, {
...options,
priority: NIP07_PRIORITY.HIGH,
}),
{
priority: -20,
source: activeSigner.type || "signer",
@@ -4528,7 +4533,11 @@ export class NostrClient {
) {
addCandidate(
"nip04",
activeSigner.nip04Decrypt.bind(activeSigner),
(pubkey, ciphertext, options) =>
activeSigner.nip04Decrypt(pubkey, ciphertext, {
...options,
priority: NIP07_PRIORITY.HIGH,
}),
{
priority: -10,
source: activeSigner.type || "signer",