mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 12:45:20 +00:00
The original PR introduced a PendingFileManager that held incoming files in memory until user acceptance. However, this approach had issues: 1. No UI was implemented for users to accept/decline files 2. Files would expire after 5 minutes, losing legitimate transfers 3. The app only allows specific media types (photos, audio) that users explicitly choose to send, so manual acceptance adds friction This commit replaces the pending file system with disk quota management: - Auto-save files immediately (preserving original UX) - Enforce 100 MB storage quota for incoming files - Auto-delete oldest files when quota is exceeded - Logs cleanup activity for visibility This directly addresses the DoS vulnerability (disk exhaustion from file spam) while maintaining good UX for legitimate transfers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>