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

refactor: process federation delete event - WPB-10188 #1918

Merged
merged 56 commits into from
Oct 4, 2024

Conversation

jullianm
Copy link
Contributor

@jullianm jullianm commented Sep 11, 2024

TaskWPB-10188 [iOS] Process FederationDeleteEvent

Key Points

This PR is part of the quick sync refactoring plan and is related to processing the multiple events we receive from the backend or the push channel.

Specifically, this PR is about porting the existing implementation of the FederationDeleteEventProcessor event.

Legacy code was using a FederationTerminationManager part of WireRequestStrategy framework to manage the storage logic.

federationTerminationManager.handleFederationTerminationWith(payload.domain)

To avoid using this internal dependency, we now directly perform the storage logic operations in our dedicated ConnectionRepository object.

Note: The following ongoing PR here was merged into this one as they are closely related.

Testing

UTs cover the following use cases, ensuring that:

  • a 1:1 conversation is marked as read-only.
  • pending connections requests are ignored.
  • sent connection requests are cancelled.
  • connections for connected users are removed.
  • selfUser is removed from conversation hosted by defederated domain.
  • it removes a user from a conversation hosted by self user domain.
  • it removes selfUser and another user from a conversation hosted by another domain.

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

Copy link
Contributor

github-actions bot commented Sep 12, 2024

Test Results

233 tests   233 ✅  6s ⏱️
 38 suites    0 💤
  2 files      0 ❌

Results for commit 18662f1.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

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

should we close #1900 then? @jullianm
the rest looks ok apart from swiftlint warnings

@jullianm
Copy link
Contributor Author

@netbe yep I closed the other PR since changes are already part of this PR

@jullianm jullianm added this pull request to the merge queue Oct 4, 2024
Merged via the queue into develop with commit d384bd4 Oct 4, 2024
11 of 12 checks passed
@jullianm jullianm deleted the refactor/process-federation-delete-event branch October 4, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes/initiative: ios-sync-refactoring echoes: maintenance Maintenance activity - Refactoring , Preventive , Improvements to code , Performance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants