-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6255 move services from messaging common module into the correct module and refactor them #6409
6255 move services from messaging common module into the correct module and refactor them #6409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request refactors and relocates services from the messaging/common
module to their appropriate modules, aiming to avoid circular dependencies and improve code organization.
- File Relocations: Moved
is-email-blocklisted.util.ts
and its test toblocklist
module. Updated import paths accordingly. - Service Deletions: Removed
add-person-id-and-workspace-member-id.service.ts
fromcalendar-messaging-participant-manager
. - Method Updates: Added
workspaceId
parameter incalendar-save-events.service.ts
and renamed methods incalendar-event-participant.service.ts
. - Module Refactors: Updated
messaging-common.module.ts
to remove several services and streamlinedmessaging-import-manager.module.ts
with new imports and providers. - Job and Utility Adjustments: Updated method calls and import paths in various job and utility files to reflect the new module structure.
30 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
…ule-into-the-correct-module-and-refactor-them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement, I've left additional comments
@@ -19,6 +21,7 @@ export class CalendarEventParticipantService { | |||
public async upsertAndDeleteCalendarEventParticipants( | |||
participantsToSave: CalendarEventParticipantWithCalendarEventId[], | |||
participantsToUpdate: CalendarEventParticipantWithCalendarEventId[], | |||
workspaceId: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you have to pass the workspaceId here, you could get it from the scopedWorkspaceContextFactory (see twenty-orm.manager.ts). This would avoid the whole drill down and secure the behavior to avoid proposing where the workspace can be provided. That's being said I'm not 100% sure about this pattern of auto-resolving the workspaceId from the request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
...s/calendar/calendar-event-participant-manager/services/calendar-event-participant.service.ts
Outdated
Show resolved
Hide resolved
|
||
@Module({ | ||
imports: [WorkspaceDataSourceModule], | ||
providers: [AddPersonIdAndWorkspaceMemberIdService], | ||
providers: [], | ||
exports: [], | ||
}) | ||
export class CalendarCommonModule {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this one? looks like nothing is provided or exported
Closes #6255
messaging/common
into the correct modulecalendar-messaging-participant-manager
MatchParticipantModule