Refactor Message Queue Logic
- Task 31: Refactor Message Queue Logic
- Refactored the message queue to slow down message sending to at most 1 per second.
- Implemented new batching logic:
- Consecutive text messages are concatenated and sent as a single message.
- HTML messages are sent individually.
- The queue now only processes one “batch” (either a single HTML message or a group of text messages) per interval.
- Updated the unit tests to reflect the new logic and fixed a bug related to shared state between tests.
Morpheum