Skip to content
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

Use twentyORM in Timeline messaging #6595

Merged
merged 33 commits into from
Aug 15, 2024
Merged

Use twentyORM in Timeline messaging #6595

merged 33 commits into from
Aug 15, 2024

Conversation

bosiraphael
Copy link
Contributor

  • Remove raw queries and replace them by using twentyORM
  • Refactor into services and utils

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Refactored timeline messaging to use twentyORM instead of raw queries, enhancing maintainability and modularity.

  • timeline-thread-participant.dto.ts: Made personId and workspaceMemberId nullable to align with GraphQL schema.
  • get-messages-from-company-id.service.ts: Introduced service to fetch messages by company ID using twentyORM.
  • get-messages-from-person-ids.service.ts: Added service to retrieve messages by person IDs, leveraging twentyORM.
  • timeline-messaging.service.ts: Refactored to use twentyORM for fetching message threads and visibility.
  • timeline-messaging.module.ts: Updated to include new services for handling messages from company and person IDs.

11 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings

): Promise<{
[key: string]: MessageChannelVisibility;
}> {
const messageThreadIdsForWhichWorkspaceMemberIsNotInParticipants =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider optimizing the reduce function for better performance.

@charlesBochet charlesBochet merged commit 08c7947 into main Aug 15, 2024
8 of 11 checks passed
@charlesBochet charlesBochet deleted the 6430-part-2 branch August 15, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants