mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
7e2d2542b0
* Initial plan * Split group notifications into separate background task - Created GroupMentionedInCommentNotificationsTask for handling group mention notifications - Updated CommentCreatedNotificationsTask to delegate group notifications - Updated CommentUpdatedNotificationsTask to delegate group notifications - Added comprehensive tests for the new task - Improved scalability with batch processing (10 members per batch) - Enhanced resilience by isolating group notification failures Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Optimize database queries in GroupMentionedInCommentNotificationsTask - Batch fetch users instead of individual queries for better performance - Add defensive comment explaining duplicate mentions check - Create user map for O(1) lookups within batch Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Add comment explaining concurrency control in batch processing Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Remove unnecessary document loading - use event properties directly - Removed Document import and document loading query - Use event.documentId and event.teamId directly - Reduces database queries and improves performance - canUserAccessDocument loads document internally when needed Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Fix TypeScript errors and test failures - Fixed test: buildComment requires documentId parameter - Fixed type error: use nullish coalescing for group.actorId ?? event.actorId - Fixed type definition: use Omit<CommentEvent, "data"> to avoid type conflicts - All TypeScript errors resolved Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * test --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com>