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

[Messaging] Fix duplicate messageChannelMessage #3616

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

Weiko
Copy link
Member

@Weiko Weiko commented Jan 25, 2024

This PR adds a check before inserting anything if a messageChannelMessage already exists. This should not happen however this part of the code is executed in a job so we want to make sure this part is idempotent in case of retry strategies.
It also adds a check in the partial-sync import, where we don't want to import messages that are in both messageAdded and messageDeleted. This can happen when we do a partial sync after a message has been created (DRAFT or SENT) then deleted, since querying later on with gmail api will result in a 404.

@Weiko Weiko changed the title [Messaging] Fix duplicate channelMessageChannel [Messaging] Fix duplicate messageChannelMessage Jan 25, 2024
return;
}

const existingMessageChannelMessages =
Copy link
Member

Choose a reason for hiding this comment

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

messageChannelMessageAssociations

@Weiko Weiko merged commit 6d997ed into main Jan 25, 2024
6 checks passed
@Weiko Weiko deleted the c-fix-message-channel-message-already-imported branch January 25, 2024 13: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.

None yet

2 participants