Skip to content

Refactor WhatsApp session management and database queries - #289

Open
RenoXF wants to merge 1 commit into
vermaysha:masterfrom
RenoXF:master
Open

Refactor WhatsApp session management and database queries#289
RenoXF wants to merge 1 commit into
vermaysha:masterfrom
RenoXF:master

Conversation

@RenoXF

@RenoXF RenoXF commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator
  • Improved SSE handling in src/server/sse/index.ts by adding cleanup logic for unsubscribing and clearing intervals.
  • Removed obsolete message handling in src/shutdown.ts and src/whatsapp/db-migration.ts, including dropping unused tables.
  • Introduced message-store.ts to manage sent messages per device, optimizing memory usage.
  • Consolidated group-related queries into src/whatsapp/queries/groups.ts and removed unused message and media queries.
  • Updated src/whatsapp/whatsapp-session.ts to utilize the new message store and removed legacy media handling.
  • Enhanced code readability and maintainability by restructuring functions and improving error handling.

- Improved SSE handling in `src/server/sse/index.ts` by adding cleanup logic for unsubscribing and clearing intervals.
- Removed obsolete message handling in `src/shutdown.ts` and `src/whatsapp/db-migration.ts`, including dropping unused tables.
- Introduced `message-store.ts` to manage sent messages per device, optimizing memory usage.
- Consolidated group-related queries into `src/whatsapp/queries/groups.ts` and removed unused message and media queries.
- Updated `src/whatsapp/whatsapp-session.ts` to utilize the new message store and removed legacy media handling.
- Enhanced code readability and maintainability by restructuring functions and improving error handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant