mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Fix user block list decryption timeout and state wiping
Refactored `js/userBlocks.js` to handle NIP-07 decryption timeouts gracefully. Previously, if a background decryption timed out (common with busy extensions or queues), the user's block list was reset to an empty state, exposing them to blocked content until the next successful retry. The fix ensures that if a timeout occurs, the existing (stale) block list is preserved while a retry is scheduled in the background. Also increased the `BACKGROUND_DECRYPT_TIMEOUT_MS` from 2500ms to 5000ms to reduce false positives. Added `tests/user-blocks-decryption.test.mjs` to verify the fix and audit the decryption flow. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
22c91ff7e0
commit
cab964e41e
4 files changed
+1342
-380
No files matched your search
Generated
+1120
-364
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user