Skip to content

Commit cd411b5

Browse files
authored
MSC4075 Use expirationTS to define the call ringing window (#4652)
* Listen to call decline to stop ringing when declined from other device * MSC4075 Use expirationTS to define the call ringing window * Implement ElementCallService tests. * Update acknowledgements.
1 parent 91dabf9 commit cd411b5

File tree

15 files changed

+485
-19
lines changed

15 files changed

+485
-19
lines changed

ElementX.xcodeproj/project.pbxproj

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
3C73442084BF8A6939F0F80B /* AnalyticsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5445FCE0CE15E634FDC1A2E2 /* AnalyticsService.swift */; };
345345
3CB9EC9B670C90618B839D1B /* RemotePreference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69A05E85E4872C3221C5C287 /* RemotePreference.swift */; };
346346
3CE4C5071B6D2576E2473989 /* OrderedSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62B07B296D7A9D2F09120853 /* OrderedSet.swift */; };
347+
3D0DAED550E967AB49F1758C /* CXProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E68CA59F66CE43B66D129E9 /* CXProviderProtocol.swift */; };
347348
3D72F5F9109AAA257542456B /* CallInviteRoomTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 664ABD745A746C45CB842158 /* CallInviteRoomTimelineView.swift */; };
348349
3DA57CA0D609A6B37CA1DC2F /* BugReportService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6DC38E64A5ED3FDB201029A /* BugReportService.swift */; };
349350
3DAD62988F072607441CB7A5 /* PollFormScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25F8664F1FB95AF3C4202478 /* PollFormScreenCoordinator.swift */; };
@@ -469,6 +470,7 @@
469470
53C1E7F6A7D6409D89F36ED7 /* AggregatedReactionMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69CB8242D69B7E4D0B32E18D /* AggregatedReactionMock.swift */; };
470471
53DEF39F0C4DE02E3FC56D91 /* KeychainAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 800631D7250B7F93195035F1 /* KeychainAccess */; };
471472
53F1196F9C69512306A2693F /* TextRoomTimelineItemContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28C19F54A0C4FC9AB7ABD583 /* TextRoomTimelineItemContent.swift */; };
473+
5470E62F65AE1803BBF3D528 /* CXProviderMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86E1BAA7232081635662A83F /* CXProviderMock.swift */; };
472474
54AE8860D668AFD96E7E177B /* UITestsScreenIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CEBE5EA91E8691EDF364EC2 /* UITestsScreenIdentifier.swift */; };
473475
54FDA3625AACBD9E438D084D /* BlurEffectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07934EF08BB39353E4A94272 /* BlurEffectView.swift */; };
474476
5518DA4A6C9B4FC4B497EA9A /* LogViewerScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01B795AAAB7B8747FE2FF311 /* LogViewerScreenModels.swift */; };
@@ -1014,6 +1016,7 @@
10141016
B5479997ECC516C121E6625E /* LocationMarkerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFECCE59967018204876D0A5 /* LocationMarkerView.swift */; };
10151017
B5899F18AD6C56CE08FE532B /* RoomSummaryProviderMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC83F47D2173B7538AA72E0E /* RoomSummaryProviderMock.swift */; };
10161018
B5BCE012F9E7C45D1C76108E /* RoomMembersListScreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2520C4F33AA0C061D209C28 /* RoomMembersListScreenTests.swift */; };
1019+
B5C40DCFFDFBA0F86E228602 /* Clocks in Frameworks */ = {isa = PBXBuildFile; productRef = FFA423B0A7BBD8AA9BB91AB0 /* Clocks */; };
10171020
B5E455C9689EA600EDB3E9E0 /* NavigationRootCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA28F29C9F93E93CC3C2C715 /* NavigationRootCoordinator.swift */; };
10181021
B6048166B4AA4CEFEA9B77A6 /* InfoPlistReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A580295A56B55A856CC4084 /* InfoPlistReader.swift */; };
10191022
B6064D82FCDCB829601C1F59 /* SecureBackupLogoutConfirmationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37FEE10AB666891E6A675E5E /* SecureBackupLogoutConfirmationScreen.swift */; };
@@ -1195,6 +1198,7 @@
11951198
D63974A88CF2BC721F109C77 /* Compound in Frameworks */ = {isa = PBXBuildFile; productRef = DCA3C4A997AD28E6918D4CE5 /* Compound */; };
11961199
D6DE764B17FB4A9A12C33BF4 /* MessageComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F1DF3FFFE5ED2B8133F43A7 /* MessageComposer.swift */; };
11971200
D7CDBAE82782BD0529DECB5F /* AttributedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52BD6ED18E2EB61E28C340AD /* AttributedString.swift */; };
1201+
D820B3C223E4C2E77BB2A2BF /* ElementCallServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EA2AFF6EB59FE25234D29F3 /* ElementCallServiceTests.swift */; };
11981202
D8459AAD6969B1431ECBE990 /* UnsupportedRoomTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E535B3388755B65C34CD10 /* UnsupportedRoomTimelineView.swift */; };
11991203
D8517B8EED58D24396FB71E7 /* DeactivateAccountScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17BAE25A0E9E9F2F1BBA8930 /* DeactivateAccountScreenViewModel.swift */; };
12001204
D885B783B95AD7832D4EF5DD /* CharacterSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F8C01DEEA83903D45069BBD /* CharacterSet.swift */; };
@@ -2003,6 +2007,7 @@
20032007
5E33FD32BBC44D703C7AE4F9 /* TextBasedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextBasedRoomTimelineItem.swift; sourceTree = "<group>"; };
20042008
5E43D8784B0054C048060FEB /* LabsScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabsScreenModels.swift; sourceTree = "<group>"; };
20052009
5E5A65B5A000E7237AC61C67 /* LeaveSpaceViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeaveSpaceViewModel.swift; sourceTree = "<group>"; };
2010+
5E68CA59F66CE43B66D129E9 /* CXProviderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CXProviderProtocol.swift; sourceTree = "<group>"; };
20062011
5E6DE144D887A254F4CAF203 /* UserPreference.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPreference.swift; sourceTree = "<group>"; };
20072012
5E75948AA1FE1D1A7809931F /* AuthenticationServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProtocol.swift; sourceTree = "<group>"; };
20082013
5E9CBF577B9711CFBB4FA40D /* VoiceMessageRecordingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageRecordingView.swift; sourceTree = "<group>"; };
@@ -2155,6 +2160,7 @@
21552160
7DDBF99755A9008CF8C8499E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
21562161
7DDF49CEBC0DFC59C308335F /* RoomMemberDetailsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMemberDetailsScreenViewModelProtocol.swift; sourceTree = "<group>"; };
21572162
7E8562F4D7DE073BC32902AB /* EncryptionResetScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionResetScreenViewModelProtocol.swift; sourceTree = "<group>"; };
2163+
7EA2AFF6EB59FE25234D29F3 /* ElementCallServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementCallServiceTests.swift; sourceTree = "<group>"; };
21582164
7EB58E4E8D6D634C246AD5C2 /* RoomInviterLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomInviterLabel.swift; sourceTree = "<group>"; };
21592165
7EECE8B331CD169790EF284F /* BugReportScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BugReportScreenViewModelTests.swift; sourceTree = "<group>"; };
21602166
7F615A00DB223FF3280204D2 /* UserDiscoveryServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoveryServiceProtocol.swift; sourceTree = "<group>"; };
@@ -2212,6 +2218,7 @@
22122218
86A6F283BC574FDB96ABBB07 /* DeveloperOptionsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeveloperOptionsScreenViewModel.swift; sourceTree = "<group>"; };
22132219
86C8CE2630F54D5FE1591786 /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/InfoPlist.strings; sourceTree = "<group>"; };
22142220
86D7CD5CA270BFC3EBB450CA /* PinnedEventsTimelineScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinnedEventsTimelineScreenViewModel.swift; sourceTree = "<group>"; };
2221+
86E1BAA7232081635662A83F /* CXProviderMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CXProviderMock.swift; sourceTree = "<group>"; };
22152222
87FC42213E86E8182CFD3A49 /* preview_avatar_user.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = preview_avatar_user.jpg; sourceTree = "<group>"; };
22162223
88410BD213FDF9B28E8B671F /* UserDetailsEditScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDetailsEditScreen.swift; sourceTree = "<group>"; };
22172224
8896CDD20CA2D87EA3B848A1 /* RoomNotificationSettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsScreen.swift; sourceTree = "<group>"; };
@@ -2872,6 +2879,7 @@
28722879
files = (
28732880
7FF27DA70D833CFC5724EFC5 /* MatrixRustSDK in Frameworks */,
28742881
BCA5E2157CE27AB6F1D043D3 /* AsyncAlgorithms in Frameworks */,
2882+
B5C40DCFFDFBA0F86E228602 /* Clocks in Frameworks */,
28752883
);
28762884
runOnlyForDeploymentPostprocessing = 0;
28772885
};
@@ -3530,6 +3538,7 @@
35303538
8F7FC9580CABF797A2E6213A /* BugReportServiceMock.swift */,
35313539
E2F96CCBEAAA7F2185BFA354 /* ClientProxyMock.swift */,
35323540
4E600B315B920B9687F8EE1B /* ComposerDraftServiceMock.swift */,
3541+
86E1BAA7232081635662A83F /* CXProviderMock.swift */,
35333542
E321E840DCC63790049984F4 /* ElementCallServiceMock.swift */,
35343543
3A21027F05874B1BCC3E452B /* InvitedRoomProxyMock.swift */,
35353544
867DC9530C42F7B5176BE465 /* JoinedRoomProxyMock.swift */,
@@ -4606,6 +4615,7 @@
46064615
DEBB74427E24AF30CDB131B7 /* DeferredFulfillmentTests.swift */,
46074616
6D0A27607AB09784C8501B5C /* DeveloperOptionsScreenViewModelTests.swift */,
46084617
906451FB8CF27C628152BF7A /* EditRoomAddressScreenViewModelTests.swift */,
4618+
7EA2AFF6EB59FE25234D29F3 /* ElementCallServiceTests.swift */,
46094619
A1087DCC491CD4C027173DDA /* EmojiPickerScreenViewModelTests.swift */,
46104620
099F2D36C141D845A445B1E6 /* EmojiProviderTests.swift */,
46114621
84B7A28A6606D58D1E38C55A /* ExpiringTaskRunnerTests.swift */,
@@ -5183,6 +5193,7 @@
51835193
92E99C57D7F92ED16F73282C /* ElementCall */ = {
51845194
isa = PBXGroup;
51855195
children = (
5196+
5E68CA59F66CE43B66D129E9 /* CXProviderProtocol.swift */,
51865197
CC437C491EA6996513B1CEAB /* ElementCallConfiguration.swift */,
51875198
33AE897D86784CCA5E4E9227 /* ElementCallService.swift */,
51885199
406C90AF8C3E98DF5D4E5430 /* ElementCallServiceConstants.swift */,
@@ -6709,6 +6720,7 @@
67096720
packageProductDependencies = (
67106721
C07EA60CAB296D7726210F5B /* MatrixRustSDK */,
67116722
5A8EF1A5F9629FCA309D4B2A /* AsyncAlgorithms */,
6723+
FFA423B0A7BBD8AA9BB91AB0 /* Clocks */,
67126724
);
67136725
productName = UnitTests;
67146726
productReference = AAC9344689121887B74877AF /* UnitTests.xctest */;
@@ -6959,6 +6971,7 @@
69596971
E025F19D013D9BA6C58B37F4 /* XCRemoteSwiftPackageReference "swift-algorithms" */,
69606972
AC3475112CA40C2C6E78D1EB /* XCRemoteSwiftPackageReference "matrix-analytics-events" */,
69616973
4A8D3ABF18EABB8066BBD46E /* XCRemoteSwiftPackageReference "swift-async-algorithms" */,
6974+
869B65C34E469FC879A9F116 /* XCRemoteSwiftPackageReference "swift-clocks" */,
69626975
F76A08D0EA29A07A54F4EB4D /* XCRemoteSwiftPackageReference "swift-collections" */,
69636976
4C34425923978C97409A3EF2 /* XCRemoteSwiftPackageReference "DSWaveformImage" */,
69646977
D5F7D47BBAAE0CF1DDEB3034 /* XCRemoteSwiftPackageReference "DeviceKit" */,
@@ -7371,6 +7384,7 @@
73717384
A583B70939707197B0B21DFC /* DeferredFulfillmentTests.swift in Sources */,
73727385
864C69CF951BF36D25BE0C03 /* DeveloperOptionsScreenViewModelTests.swift in Sources */,
73737386
EDB6915EC953BB2A44AA608E /* EditRoomAddressScreenViewModelTests.swift in Sources */,
7387+
D820B3C223E4C2E77BB2A2BF /* ElementCallServiceTests.swift in Sources */,
73747388
7AE25D29734267271106D732 /* EmojiPickerScreenViewModelTests.swift in Sources */,
73757389
25618589E0DE0F1E95FC7B5C /* EmojiProviderTests.swift in Sources */,
73767390
71B62C48B8079D49F3FBC845 /* ExpiringTaskRunnerTests.swift in Sources */,
@@ -7684,6 +7698,8 @@
76847698
172E6E9A612ADCF10A62CF13 /* BugReportServiceProtocol.swift in Sources */,
76857699
E1DF24D085572A55C9758A2D /* Bundle.swift in Sources */,
76867700
6BAD956B909A6E29F6CC6E7C /* ButtonStyle.swift in Sources */,
7701+
5470E62F65AE1803BBF3D528 /* CXProviderMock.swift in Sources */,
7702+
3D0DAED550E967AB49F1758C /* CXProviderProtocol.swift in Sources */,
76877703
01B63F1A04A276B39AC17014 /* CallInviteRoomTimelineItem.swift in Sources */,
76887704
3D72F5F9109AAA257542456B /* CallInviteRoomTimelineView.swift in Sources */,
76897705
E5AB28123E2488F97E953AC0 /* CallNotificationRoomTimelineItem.swift in Sources */,
@@ -9484,6 +9500,14 @@
94849500
minimumVersion = 1.4.2;
94859501
};
94869502
};
9503+
869B65C34E469FC879A9F116 /* XCRemoteSwiftPackageReference "swift-clocks" */ = {
9504+
isa = XCRemoteSwiftPackageReference;
9505+
repositoryURL = "https://github.com/pointfreeco/swift-clocks";
9506+
requirement = {
9507+
kind = upToNextMajorVersion;
9508+
minimumVersion = 1.0.6;
9509+
};
9510+
};
94879511
91740346377FEBEAF7AD32FC /* XCRemoteSwiftPackageReference "swift-mutex" */ = {
94889512
isa = XCRemoteSwiftPackageReference;
94899513
repositoryURL = "https://github.com/swhitty/swift-mutex";
@@ -9916,6 +9940,11 @@
99169940
package = AB8E808A59756170682BEC20 /* XCRemoteSwiftPackageReference "SwiftSoup" */;
99179941
productName = SwiftSoup;
99189942
};
9943+
FFA423B0A7BBD8AA9BB91AB0 /* Clocks */ = {
9944+
isa = XCSwiftPackageProductDependency;
9945+
package = 869B65C34E469FC879A9F116 /* XCRemoteSwiftPackageReference "swift-clocks" */;
9946+
productName = Clocks;
9947+
};
99199948
/* End XCSwiftPackageProductDependency section */
99209949
};
99219950
rootObject = AC22997D58D612146053154D /* Project object */;

ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// Copyright 2025 New Vector Ltd.
3+
//
4+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
5+
// Please see LICENSE files in the repository root for full details.
6+
//
7+
8+
extension CXProviderMock {
9+
struct Configuration { }
10+
11+
convenience init(_ configuration: Configuration) {
12+
self.init()
13+
reportNewIncomingCallWithUpdateCompletionClosure = { _, _, completion in
14+
completion(nil)
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)