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

feat: Improve event builder #17756

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

feat: Improve event builder #17756

wants to merge 2 commits into from

Conversation

przemvs
Copy link
Contributor

@przemvs przemvs commented Jul 15, 2024

Description

Screenshots/Screencast (for UI changes)

Checklist

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

Important details for the reviewers

(Delete this section if unnecessary)

  • use (x) data
  • can be reviewed commit-by-commit
  • be sure to look at ...

Copy link

Comment on lines +972 to +974
// const creationEvent = conversationEntity.isGroup()
// ? EventBuilder.buildGroupCreation(conversationEntity, isTemporaryGuest, timestamp)
// : EventBuilder.build1to1Creation(conversationEntity);
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 what to do with this?

@@ -2304,7 +2347,12 @@ export class ConversationRepository {
}) => {
switch (conversationVerificationState) {
case ConversationVerificationState.VERIFIED:
const allVerifiedEvent = EventBuilder.buildAllVerified(conversationEntity);
// const allVerifiedEvent = EventBuilder.buildAllVerified(conversationEntity);
Copy link
Contributor

Choose a reason for hiding this comment

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

also unneeded?

@@ -135,7 +135,7 @@ describe('ProteusConversationVerificationStateHandler', () => {
expect(conversationB.verification_state()).toBe(ConversationVerificationState.VERIFIED);
expect(conversationAB.is_verified()).toBeDefined();
expect(conversationAB.is_verified()).toBeTruthy();
expect(EventBuilder.buildAllVerified).not.toHaveBeenCalled();
// expect(EventBuilder.buildAllVerified).not.toHaveBeenCalled();
Copy link
Contributor

Choose a reason for hiding this comment

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

guess this should be replaced with createBaseEvent

@@ -169,7 +169,7 @@ describe('ProteusConversationVerificationStateHandler', () => {
expect(conversationAB.verification_state()).toBe(ConversationVerificationState.VERIFIED);
expect(conversationB.verification_state()).toBe(ConversationVerificationState.VERIFIED);
expect(conversationC.verification_state()).toBe(ConversationVerificationState.VERIFIED);
expect(EventBuilder.buildAllVerified).toHaveBeenCalledTimes(3);
// expect(EventBuilder.buildAllVerified).toHaveBeenCalledTimes(3);
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Copy link

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.

3 participants