-
Notifications
You must be signed in to change notification settings - Fork 36
chore: remove legacy sync - WPB-18928 #4024
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
Merged
Merged
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
30bddbb
remove starscream
netbe 0a1c446
remove PushChannel
netbe 088bd47
mocktransport
netbe 614dee1
wip
netbe 0394f2a
EventPayloadDecoder
netbe 51759bf
conversationeventprocessor
netbe 3085223
remove strategies
netbe 3e50324
remove LastUpdateEventIDRepository
netbe 762551d
Revert "conversationeventprocessor"
netbe 57ca4ca
Revert "EventPayloadDecoder"
netbe f7d1b9b
restore conversationEventProcessor
netbe a25b7c2
wip
netbe 9489f77
Revert "remove LastUpdateEventIDRepository"
netbe 05265dc
fix
netbe b75abd0
restore notifications
netbe 6a32ebe
wip
netbe 06ec233
build and run
netbe ea46c48
wip
netbe 802dad8
notification+events
netbe 4433bed
EventPayloadDecoder
netbe 74c44f1
conversationeventprocessor
netbe 59a1500
remove strategies
netbe baebc7c
remove LastUpdateEventIDRepository
netbe 672c738
Revert "conversationeventprocessor"
netbe 24ecb24
Revert "EventPayloadDecoder"
netbe 4db496b
restore conversationEventProcessor
netbe 4628268
wip
netbe 77f980e
Revert "remove LastUpdateEventIDRepository"
netbe c2cbffd
fix
netbe f3cd97d
restore notifications
netbe 1d7e8c8
wip
netbe f5ea6fb
build and run
netbe 91af1ef
fix warning
netbe 78f3793
wip
netbe b9baa43
ignore claude
netbe 9a7090d
clean up
netbe 9363003
Revert "notification+events"
netbe 82f2e31
restore
netbe bead307
fix ref
netbe b207c61
lazy load crypto
netbe a26e99b
speed tests
netbe c07c6d9
compile syncengine and run tests
netbe 22219af
fix test
netbe 996b754
fix tests
netbe b95669a
fix merge conflict
netbe 9567b15
merge develop resolve conflicts
netbe 9f50322
format
netbe f19b912
resolve merge conflict with develop
netbe ed77571
Merge branch 'develop' into chore/remove-legacy
netbe 7203adc
remove unused ZMLocalNotification code
netbe 3716c65
verify code is useful
netbe d4e6c10
wip
netbe 3439eba
cleanup
netbe f44fe48
remove logging
netbe 9c25cb1
Apply suggestion from @netbe
netbe 5962ea0
remove dead code
netbe 8368ca8
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe 100cba1
remove minimum api version
netbe 8f913d6
Merge branch 'develop' into chore/remove-legacy
netbe 9289e0f
Apply suggestion from @netbe
netbe d30d7dc
fix tests
netbe 62327e7
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe 9bb40f7
Merge branch 'develop' into chore/remove-legacy
netbe cbdb7ff
merge with origin develop
netbe 0aad00e
cleanup and fix sync issue
netbe bb9d151
format
netbe bd02346
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe 750568b
Merge branch 'develop' into chore/remove-legacy
netbe 829870e
Merge branch 'develop' into chore/remove-legacy
netbe 1798317
code review
netbe 7ececb3
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe d627acf
add missing model
netbe 0e63a9e
Merge branch 'develop' into chore/remove-legacy
netbe 6a83aef
code review
netbe c70174d
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe bd32de5
Merge branch 'develop' into chore/remove-legacy
netbe 7b46064
fix conflict
netbe 4a91c69
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe 17f8bb7
Merge branch 'develop' into chore/remove-legacy
netbe 1f7f291
Merge branch 'develop' into chore/remove-legacy
netbe a9d857c
remove test because not needed anymore
netbe 51a288a
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 0 additions & 153 deletions
153
wire-ios-request-strategy/Sources/Helpers/EventDecoderDecryptionTests.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,153 +0,0 @@ | ||
| // | ||
| // Wire | ||
| // Copyright (C) 2026 Wire Swiss GmbH | ||
| // | ||
| // This program is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
| // | ||
| // This program is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see http://www.gnu.org/licenses/. | ||
| // | ||
|
|
||
| import Foundation | ||
| import GenericMessageProtocol | ||
| import WireCoreCrypto | ||
| import WireDataModel | ||
| import XCTest | ||
|
|
||
| @testable import WireDataModelSupport | ||
| @testable import WireRequestStrategy | ||
|
|
||
| final class EventDecoderDecryptionTests: MessagingTestBase { | ||
|
|
||
| func testThatItCanDecryptOTRMessageAddEvent() async throws { | ||
| // GIVEN | ||
| let lastEventIDRepository = MockLastEventIDRepositoryInterface() | ||
| let sut = EventDecoder( | ||
| eventMOC: eventMOC, | ||
| syncMOC: syncMOC, | ||
| lastEventIDRepository: lastEventIDRepository, | ||
| isFederationEnabled: false | ||
| ) | ||
| let text = "Trentatre trentini andarono a Trento tutti e trentatre trotterellando" | ||
| let generic = GenericMessage(content: Text(content: text)) | ||
|
|
||
| // WHEN | ||
| let decryptedEvent = try await decryptedUpdateEventFromOtherClient( | ||
| message: generic, | ||
| eventDecoder: sut | ||
| ) | ||
|
|
||
| await syncMOC.performGrouped { | ||
| // THEN | ||
| XCTAssertEqual(decryptedEvent.senderUUID, self.otherUser.remoteIdentifier!) | ||
| XCTAssertEqual(decryptedEvent.recipientClientID, self.selfClient.remoteIdentifier!) | ||
|
|
||
| guard let decryptedMessage = ZMClientMessage.createOrUpdate( | ||
| from: decryptedEvent, | ||
| in: self.syncMOC, | ||
| prefetchResult: nil | ||
| ) else { | ||
| return XCTFail("Failed to create client message") | ||
| } | ||
| XCTAssertEqual(decryptedMessage.nonce?.transportString(), generic.messageID) | ||
| XCTAssertEqual(decryptedMessage.textMessageData?.messageText, text) | ||
| } | ||
| } | ||
|
|
||
| func testThatItCanDecryptOTRAssetAddEvent() async throws { | ||
| // GIVEN | ||
| let lastEventIDRepository = MockLastEventIDRepositoryInterface() | ||
| let sut = EventDecoder( | ||
| eventMOC: eventMOC, | ||
| syncMOC: syncMOC, | ||
| lastEventIDRepository: lastEventIDRepository, | ||
| isFederationEnabled: false | ||
| ) | ||
| let image = verySmallJPEGData() | ||
| let imageSize = ZMImagePreprocessor.sizeOfPrerotatedImage(with: image) | ||
| let properties = ZMIImageProperties(size: imageSize, length: UInt(image.count), mimeType: "image/jpg") | ||
| let keys = ZMImageAssetEncryptionKeys(otrKey: Data.randomEncryptionKey(), sha256: image.zmSHA256Digest()) | ||
| let generic = GenericMessage(content: ImageAsset( | ||
| mediumProperties: properties, | ||
| processedProperties: properties, | ||
| encryptionKeys: keys, | ||
| format: .medium | ||
| )) | ||
|
|
||
| // WHEN | ||
| let decryptedEvent = try await decryptedAssetUpdateEventFromOtherClient( | ||
| message: generic, | ||
| eventDecoder: sut | ||
| ) | ||
|
|
||
| await syncMOC.perform { | ||
| // THEN | ||
| guard let decryptedMessage = ZMAssetClientMessage.createOrUpdate( | ||
| from: decryptedEvent, | ||
| in: self.syncMOC, | ||
| prefetchResult: nil | ||
| ) else { | ||
| return XCTFail("Failed to create client message") | ||
| } | ||
|
|
||
| XCTAssertEqual(decryptedMessage.nonce?.transportString(), generic.messageID) | ||
| } | ||
| } | ||
|
|
||
| func testThatItInsertsAUnableToDecryptMessageIfItCanNotEstablishASession() async throws { | ||
| // GIVEN | ||
| let lastEventIDRepository = MockLastEventIDRepositoryInterface() | ||
| let sut = EventDecoder( | ||
| eventMOC: eventMOC, | ||
| syncMOC: syncMOC, | ||
| lastEventIDRepository: lastEventIDRepository, | ||
| isFederationEnabled: false | ||
| ) | ||
| var event: ZMUpdateEvent! | ||
|
|
||
| await syncMOC.perform { | ||
| let innerPayload = [ | ||
| "recipient": self.selfClient.remoteIdentifier!, | ||
| "sender": self.otherClient.remoteIdentifier!, | ||
| "id": UUID.create().transportString(), | ||
| "text": Data("bah".utf8).base64String() | ||
| ] | ||
|
|
||
| let payload = [ | ||
| "type": "conversation.otr-message-add", | ||
| "from": self.otherUser.remoteIdentifier!.transportString(), | ||
| "data": innerPayload, | ||
| "conversation": self.groupConversation.remoteIdentifier!.transportString(), | ||
| "time": Date().transportString() | ||
| ] as [String: Any] | ||
| let wrapper = [ | ||
| "id": UUID.create().transportString(), | ||
| "payload": [payload] | ||
| ] as [String: Any] | ||
|
|
||
| event = ZMUpdateEvent.eventsArray(from: wrapper as NSDictionary, source: .download)!.first! | ||
| } | ||
|
|
||
| // WHEN | ||
| _ = await sut.decryptProteusEventAndAddClient(event, in: syncMOC) { _, _ in | ||
| throw ProteusService.DecryptionError.failedToEstablishSessionFromMessage(.SessionNotFound) | ||
| } | ||
|
|
||
| await syncMOC.perform { | ||
| // THEN | ||
| guard let lastMessage = self.groupConversation.lastMessage as? ZMSystemMessage else { | ||
| return XCTFail("Last conversation message is not a system message") | ||
| } | ||
| XCTAssertEqual(lastMessage.systemMessageType, .decryptionFailed) | ||
| } | ||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
...ons/Push Notifications/Notification Types/Content/BundledMessageNotificationBuilder.swift
This file was deleted.
Oops, something went wrong.
101 changes: 0 additions & 101 deletions
101
...fications/Push Notifications/Notification Types/Content/ZMLocalNotification+Calling.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.