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

Outlook integration #9631

Merged
merged 38 commits into from
Jan 16, 2025
Merged

Outlook integration #9631

merged 38 commits into from
Jan 16, 2025

Conversation

guillim
Copy link
Contributor

@guillim guillim commented Jan 15, 2025

Get Partial messages

guillim added 28 commits January 6, 2025 17:54
@guillim guillim self-assigned this Jan 15, 2025
Copy link

github-actions bot commented Jan 15, 2025

Fails
🚫

node failed.

Log

�[31mError: �[39m SyntaxError: Unexpected token C in JSON at position 0
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:5555:27)�[39m
�[90m    at fullyReadBody (node:internal/deps/undici/undici:1665:9)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[90m    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)�[39m
danger-results://tmp/danger-results-1759a504.json

Generated by 🚫 dangerJS against 44f1460

@guillim guillim marked this pull request as ready for review January 15, 2025 17:24
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

Implemented Microsoft Outlook integration for email syncing, adding support for delta-based message synchronization and proper error handling for sync cursor operations.

  • Added SYNC_CURSOR_ERROR handling in message-import-driver.exception.ts for Microsoft-specific sync issues
  • Implemented getPartialMessageList in microsoft-get-message-list.service.ts with delta API support for incremental syncing
  • Added upsert operation in messaging-message.service.ts to prevent duplicate message entries
  • Added comprehensive Microsoft 365 setup documentation with required API permissions and license requirements
  • Updated MicrosoftAPIsService to handle message channel sync states and queue message fetching jobs

8 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +189 to +195
await this.messageQueueService.add<MessagingMessageListFetchJobData>(
MessagingMessageListFetchJob.name,
{
workspaceId,
messageChannelId: messageChannel.id,
},
);
Copy link
Contributor

Choose a reason for hiding this comment

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

style: These message queue jobs are not awaited in parallel which could be slow for multiple channels. Consider using Promise.all().

Comment on lines +169 to +172
workspaceId: string,
): Promise<void> {
await this.messageChannelSyncStatusService.markAsFailedUnknownAndFlushMessagesToImport(
[messageChannel.id],
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: This re-throws the same exception type that was caught. Consider throwing MessageImportException instead to be consistent with handleUnknownException pattern

@guillim guillim merged commit f077efd into main Jan 16, 2025
34 checks passed
@guillim guillim deleted the outlook-integration branch January 16, 2025 08:50
@guillim guillim restored the outlook-integration branch January 16, 2025 08:50
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