Add the intent system back to call widget URL creation. (#4511)

Add the intent system back to widget URL creation.

Also updates the SDK handling API changes.
This commit is contained in:
Doug
2025-09-16 08:36:10 +01:00
committed by GitHub
parent 797ff404cb
commit f6d3992601
9 changed files with 413 additions and 24 deletions

View File

@@ -536,6 +536,7 @@
61A36B9BB2ADE36CEFF5E98C /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E93A1BE7D8A2EBCAD51EEB4 /* Array.swift */; };
62684AECDFC5C7DC989CBD9E /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 7B6BC3219ADD8AA0311D2B86 /* SnapshotTesting */; };
627139A3D79F032BA81E3A53 /* UserSessionFlowCoordinatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FA29BAE9B0F2D90E57B261C /* UserSessionFlowCoordinatorTests.swift */; };
62811275F1ED9EA55638838E /* RoomTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7728AA8046D460145EAC740 /* RoomTests.swift */; };
6298AB0906DDD3525CD78C6B /* KZFileWatchers in Frameworks */ = {isa = PBXBuildFile; productRef = 81DB3AB6CE996AB3954F4F03 /* KZFileWatchers */; };
62A7FC3A0191BC7181AA432B /* AudioRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 907FA4DE17DEA1A3738EFB83 /* AudioRecorder.swift */; };
62C5876C4254C58C2086F0DE /* HomeScreenContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B4B58B79A6FA250B24A1EC /* HomeScreenContent.swift */; };
@@ -1101,6 +1102,7 @@
C7774720A4B2E34693E3227C /* RoomNotificationSettingsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8896CDD20CA2D87EA3B848A1 /* RoomNotificationSettingsScreen.swift */; };
C797C0B4CF45C66CD1921252 /* SoftLogoutScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC43313F21511C853D34544E /* SoftLogoutScreenViewModelTests.swift */; };
C7ABEBECDC513F7887DACF66 /* ProgressMaskModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68010886142843705E342645 /* ProgressMaskModifier.swift */; };
C7CEFC1FB0547CFC8F5C84EF /* Room.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78C13EF5035879B6131030F /* Room.swift */; };
C7F20DBF873CC72FB482E326 /* test_rotated_image.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 723B055A57857BFF0F18D9CB /* test_rotated_image.jpg */; };
C80E06ED97CE52704A46C148 /* ClientBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A1C33355FFB0F0953C35036 /* ClientBuilder.swift */; };
C85C7A201E4CFDA477ACEBEB /* AppLockSetupSettingsScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8610C1D21565C950BCA6A454 /* AppLockSetupSettingsScreenViewModelProtocol.swift */; };
@@ -2438,6 +2440,7 @@
B6E89E530A8E92EC44301CA1 /* Bundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bundle.swift; sourceTree = "<group>"; };
B73587C2E3CF5998361AE516 /* HomeScreenRoomTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomTests.swift; sourceTree = "<group>"; };
B746EFA112532A7B701FB914 /* RoomNotificationSettingsCustomSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsCustomSectionView.swift; sourceTree = "<group>"; };
B7728AA8046D460145EAC740 /* RoomTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTests.swift; sourceTree = "<group>"; };
B7884BD256C091EB511B2EDF /* AppLockSetupPINScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockSetupPINScreenViewModelProtocol.swift; sourceTree = "<group>"; };
B788615712FED326F73D3F83 /* GlobalSearchScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalSearchScreenViewModelProtocol.swift; sourceTree = "<group>"; };
B7F0192CE2F891141A25B49F /* UITestsSignalling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITestsSignalling.swift; sourceTree = "<group>"; };
@@ -2597,6 +2600,7 @@
D751AA05AD2182BFC4608DE6 /* ur */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ur; path = ur.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
D7673F2B0B038FAB2A8D16AD /* ElementTextFieldStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementTextFieldStyle.swift; sourceTree = "<group>"; };
D77F75B3E9F99864048A422A /* DeactivateAccountScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeactivateAccountScreenViewModelTests.swift; sourceTree = "<group>"; };
D78C13EF5035879B6131030F /* Room.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Room.swift; sourceTree = "<group>"; };
D79BB714D28C9F588DD69353 /* SecureBackupScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupScreenViewModelProtocol.swift; sourceTree = "<group>"; };
D7B18089ED50324583BB2FB7 /* EditRoomAddressScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditRoomAddressScreenViewModelProtocol.swift; sourceTree = "<group>"; };
D7BB243B26D54EF1A0C422C0 /* NotificationContentBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationContentBuilder.swift; sourceTree = "<group>"; };
@@ -3842,6 +3846,7 @@
858DA81F2ACF484B7CAD6AE4 /* KnockedRoomProxy.swift */,
8F062DD2CCD95DC33528A16F /* KnockRequestProxy.swift */,
C07851F4EA81AA3339806A7B /* KnockRequestProxyProtocol.swift */,
D78C13EF5035879B6131030F /* Room.swift */,
B6404166CBF5CC88673FF9E2 /* RoomDetails.swift */,
40A66E8BC8D9AE4A08EFB2DF /* RoomInfoProxy.swift */,
14517E5597594956FCE1950D /* RoomInfoProxyProtocol.swift */,
@@ -4584,6 +4589,7 @@
AEEAFB646E583655652C3D04 /* RoomStateEventStringBuilderTests.swift */,
F46E441BA50705E6CEC89FE0 /* RoomSummaryProviderTests.swift */,
046C0D3F53B0B5EF0A1F5BEA /* RoomSummaryTests.swift */,
B7728AA8046D460145EAC740 /* RoomTests.swift */,
2E88534A39781D76487D59DF /* SecureBackupKeyBackupScreenViewModelTests.swift */,
848F69921527D31CAACB93AF /* SecureBackupLogoutConfirmationScreenViewModelTests.swift */,
C0FF08D0BD7D0B4B6877AB7D /* SecureBackupRecoveryKeyScreenViewModelTests.swift */,
@@ -7323,6 +7329,7 @@
CC0D088F505F33A20DC5590F /* RoomStateEventStringBuilderTests.swift in Sources */,
6AB306367E56A6F6DFA0E2FF /* RoomSummaryProviderTests.swift in Sources */,
15913A5B07118C1268A840E4 /* RoomSummaryTests.swift in Sources */,
62811275F1ED9EA55638838E /* RoomTests.swift in Sources */,
7691233E3572A9173FD96CB3 /* SecureBackupKeyBackupScreenViewModelTests.swift in Sources */,
EB87DF90CF6F8D5D12404C6E /* SecureBackupLogoutConfirmationScreenViewModelTests.swift in Sources */,
06B31F84CE52A7A7C271267C /* SecureBackupRecoveryKeyScreenViewModelTests.swift in Sources */,
@@ -7991,6 +7998,7 @@
ED3E91E6166E4923791ACA84 /* ResolveVerifiedUserSendFailureScreenViewModelProtocol.swift in Sources */,
A494741843F087881299ACF0 /* RestorationToken.swift in Sources */,
194585F6CD77242B36D4ADF1 /* Result.swift in Sources */,
C7CEFC1FB0547CFC8F5C84EF /* Room.swift in Sources */,
6E391F7F628D984AF44385D9 /* RoomAttachmentPicker.swift in Sources */,
8587A53DE8EF94FD796DC375 /* RoomAvatarImage.swift in Sources */,
F8C87130FD999F7F1076208C /* RoomChangePermissionsScreen.swift in Sources */,
@@ -8901,7 +8909,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 17.5;
KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(DEVELOPMENT_TEAM).$(BASE_BUNDLE_IDENTIFIER)";
MACOSX_DEPLOYMENT_TARGET = 14.5;
MARKETING_VERSION = 25.09.5;
MARKETING_VERSION = 25.09.12;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCTION_APP_NAME = Element;
@@ -8977,7 +8985,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 17.5;
KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(DEVELOPMENT_TEAM).$(BASE_BUNDLE_IDENTIFIER)";
MACOSX_DEPLOYMENT_TARGET = 14.5;
MARKETING_VERSION = 25.09.5;
MARKETING_VERSION = 25.09.12;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -9314,7 +9322,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = {
kind = exactVersion;
version = 25.09.01;
version = 25.09.15;
};
};
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {

View File

@@ -158,8 +158,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : {
"revision" : "37730751af3a42569677b04d3458629a4b8dc347",
"version" : "25.9.1"
"revision" : "057d3eadee753c8dbb4af3dd1b57947ef061a131",
"version" : "25.9.15"
}
},
{

View File

@@ -209,6 +209,52 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
}
}
//MARK: - addRecentEmoji
open var addRecentEmojiEmojiThrowableError: Error?
var addRecentEmojiEmojiUnderlyingCallsCount = 0
open var addRecentEmojiEmojiCallsCount: Int {
get {
if Thread.isMainThread {
return addRecentEmojiEmojiUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = addRecentEmojiEmojiUnderlyingCallsCount
}
return returnValue!
}
}
set {
if Thread.isMainThread {
addRecentEmojiEmojiUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
addRecentEmojiEmojiUnderlyingCallsCount = newValue
}
}
}
}
open var addRecentEmojiEmojiCalled: Bool {
return addRecentEmojiEmojiCallsCount > 0
}
open var addRecentEmojiEmojiReceivedEmoji: String?
open var addRecentEmojiEmojiReceivedInvocations: [String] = []
open var addRecentEmojiEmojiClosure: ((String) async throws -> Void)?
open override func addRecentEmoji(emoji: String) async throws {
if let error = addRecentEmojiEmojiThrowableError {
throw error
}
addRecentEmojiEmojiCallsCount += 1
addRecentEmojiEmojiReceivedEmoji = emoji
DispatchQueue.main.async {
self.addRecentEmojiEmojiReceivedInvocations.append(emoji)
}
try await addRecentEmojiEmojiClosure?(emoji)
}
//MARK: - availableSlidingSyncVersions
var availableSlidingSyncVersionsUnderlyingCallsCount = 0
@@ -1814,6 +1860,75 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
}
}
//MARK: - getRecentEmojis
open var getRecentEmojisThrowableError: Error?
var getRecentEmojisUnderlyingCallsCount = 0
open var getRecentEmojisCallsCount: Int {
get {
if Thread.isMainThread {
return getRecentEmojisUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = getRecentEmojisUnderlyingCallsCount
}
return returnValue!
}
}
set {
if Thread.isMainThread {
getRecentEmojisUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
getRecentEmojisUnderlyingCallsCount = newValue
}
}
}
}
open var getRecentEmojisCalled: Bool {
return getRecentEmojisCallsCount > 0
}
var getRecentEmojisUnderlyingReturnValue: [RecentEmoji]!
open var getRecentEmojisReturnValue: [RecentEmoji]! {
get {
if Thread.isMainThread {
return getRecentEmojisUnderlyingReturnValue
} else {
var returnValue: [RecentEmoji]? = nil
DispatchQueue.main.sync {
returnValue = getRecentEmojisUnderlyingReturnValue
}
return returnValue!
}
}
set {
if Thread.isMainThread {
getRecentEmojisUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
getRecentEmojisUnderlyingReturnValue = newValue
}
}
}
}
open var getRecentEmojisClosure: (() async throws -> [RecentEmoji])?
open override func getRecentEmojis() async throws -> [RecentEmoji] {
if let error = getRecentEmojisThrowableError {
throw error
}
getRecentEmojisCallsCount += 1
if let getRecentEmojisClosure = getRecentEmojisClosure {
return try await getRecentEmojisClosure()
} else {
return getRecentEmojisReturnValue
}
}
//MARK: - getRecentlyVisitedRooms
open var getRecentlyVisitedRoomsThrowableError: Error?
@@ -12385,6 +12500,52 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
try await clearEventCacheStorageClosure?()
}
//MARK: - declineCall
open var declineCallRtcNotificationEventIdThrowableError: Error?
var declineCallRtcNotificationEventIdUnderlyingCallsCount = 0
open var declineCallRtcNotificationEventIdCallsCount: Int {
get {
if Thread.isMainThread {
return declineCallRtcNotificationEventIdUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = declineCallRtcNotificationEventIdUnderlyingCallsCount
}
return returnValue!
}
}
set {
if Thread.isMainThread {
declineCallRtcNotificationEventIdUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
declineCallRtcNotificationEventIdUnderlyingCallsCount = newValue
}
}
}
}
open var declineCallRtcNotificationEventIdCalled: Bool {
return declineCallRtcNotificationEventIdCallsCount > 0
}
open var declineCallRtcNotificationEventIdReceivedRtcNotificationEventId: String?
open var declineCallRtcNotificationEventIdReceivedInvocations: [String] = []
open var declineCallRtcNotificationEventIdClosure: ((String) async throws -> Void)?
open override func declineCall(rtcNotificationEventId: String) async throws {
if let error = declineCallRtcNotificationEventIdThrowableError {
throw error
}
declineCallRtcNotificationEventIdCallsCount += 1
declineCallRtcNotificationEventIdReceivedRtcNotificationEventId = rtcNotificationEventId
DispatchQueue.main.async {
self.declineCallRtcNotificationEventIdReceivedInvocations.append(rtcNotificationEventId)
}
try await declineCallRtcNotificationEventIdClosure?(rtcNotificationEventId)
}
//MARK: - discardRoomKey
open var discardRoomKeyThrowableError: Error?
@@ -14821,6 +14982,71 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
}
}
//MARK: - newLatestEvent
var newLatestEventUnderlyingCallsCount = 0
open var newLatestEventCallsCount: Int {
get {
if Thread.isMainThread {
return newLatestEventUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = newLatestEventUnderlyingCallsCount
}
return returnValue!
}
}
set {
if Thread.isMainThread {
newLatestEventUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
newLatestEventUnderlyingCallsCount = newValue
}
}
}
}
open var newLatestEventCalled: Bool {
return newLatestEventCallsCount > 0
}
var newLatestEventUnderlyingReturnValue: LatestEventValue!
open var newLatestEventReturnValue: LatestEventValue! {
get {
if Thread.isMainThread {
return newLatestEventUnderlyingReturnValue
} else {
var returnValue: LatestEventValue? = nil
DispatchQueue.main.sync {
returnValue = newLatestEventUnderlyingReturnValue
}
return returnValue!
}
}
set {
if Thread.isMainThread {
newLatestEventUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
newLatestEventUnderlyingReturnValue = newValue
}
}
}
}
open var newLatestEventClosure: (() async -> LatestEventValue)?
open override func newLatestEvent() async -> LatestEventValue {
newLatestEventCallsCount += 1
if let newLatestEventClosure = newLatestEventClosure {
return await newLatestEventClosure()
} else {
return newLatestEventReturnValue
}
}
//MARK: - ownUserId
var ownUserIdUnderlyingCallsCount = 0
@@ -16126,6 +16352,81 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
try await stopLiveLocationShareClosure?()
}
//MARK: - subscribeToCallDeclineEvents
open var subscribeToCallDeclineEventsRtcNotificationEventIdListenerThrowableError: Error?
var subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingCallsCount = 0
open var subscribeToCallDeclineEventsRtcNotificationEventIdListenerCallsCount: Int {
get {
if Thread.isMainThread {
return subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingCallsCount
}
return returnValue!
}
}
set {
if Thread.isMainThread {
subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingCallsCount = newValue
}
}
}
}
open var subscribeToCallDeclineEventsRtcNotificationEventIdListenerCalled: Bool {
return subscribeToCallDeclineEventsRtcNotificationEventIdListenerCallsCount > 0
}
open var subscribeToCallDeclineEventsRtcNotificationEventIdListenerReceivedArguments: (rtcNotificationEventId: String, listener: CallDeclineListener)?
open var subscribeToCallDeclineEventsRtcNotificationEventIdListenerReceivedInvocations: [(rtcNotificationEventId: String, listener: CallDeclineListener)] = []
var subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingReturnValue: TaskHandle!
open var subscribeToCallDeclineEventsRtcNotificationEventIdListenerReturnValue: TaskHandle! {
get {
if Thread.isMainThread {
return subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingReturnValue
} else {
var returnValue: TaskHandle? = nil
DispatchQueue.main.sync {
returnValue = subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingReturnValue
}
return returnValue!
}
}
set {
if Thread.isMainThread {
subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
subscribeToCallDeclineEventsRtcNotificationEventIdListenerUnderlyingReturnValue = newValue
}
}
}
}
open var subscribeToCallDeclineEventsRtcNotificationEventIdListenerClosure: ((String, CallDeclineListener) throws -> TaskHandle)?
open override func subscribeToCallDeclineEvents(rtcNotificationEventId: String, listener: CallDeclineListener) throws -> TaskHandle {
if let error = subscribeToCallDeclineEventsRtcNotificationEventIdListenerThrowableError {
throw error
}
subscribeToCallDeclineEventsRtcNotificationEventIdListenerCallsCount += 1
subscribeToCallDeclineEventsRtcNotificationEventIdListenerReceivedArguments = (rtcNotificationEventId: rtcNotificationEventId, listener: listener)
DispatchQueue.main.async {
self.subscribeToCallDeclineEventsRtcNotificationEventIdListenerReceivedInvocations.append((rtcNotificationEventId: rtcNotificationEventId, listener: listener))
}
if let subscribeToCallDeclineEventsRtcNotificationEventIdListenerClosure = subscribeToCallDeclineEventsRtcNotificationEventIdListenerClosure {
return try subscribeToCallDeclineEventsRtcNotificationEventIdListenerClosure(rtcNotificationEventId, listener)
} else {
return subscribeToCallDeclineEventsRtcNotificationEventIdListenerReturnValue
}
}
//MARK: - subscribeToIdentityStatusChanges
open var subscribeToIdentityStatusChangesListenerThrowableError: Error?
@@ -24481,9 +24782,34 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline, @unchecked Sendable {
}
open var toggleReactionItemIdKeyReceivedArguments: (itemId: EventOrTransactionId, key: String)?
open var toggleReactionItemIdKeyReceivedInvocations: [(itemId: EventOrTransactionId, key: String)] = []
open var toggleReactionItemIdKeyClosure: ((EventOrTransactionId, String) async throws -> Void)?
open override func toggleReaction(itemId: EventOrTransactionId, key: String) async throws {
var toggleReactionItemIdKeyUnderlyingReturnValue: Bool!
open var toggleReactionItemIdKeyReturnValue: Bool! {
get {
if Thread.isMainThread {
return toggleReactionItemIdKeyUnderlyingReturnValue
} else {
var returnValue: Bool? = nil
DispatchQueue.main.sync {
returnValue = toggleReactionItemIdKeyUnderlyingReturnValue
}
return returnValue!
}
}
set {
if Thread.isMainThread {
toggleReactionItemIdKeyUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
toggleReactionItemIdKeyUnderlyingReturnValue = newValue
}
}
}
}
open var toggleReactionItemIdKeyClosure: ((EventOrTransactionId, String) async throws -> Bool)?
open override func toggleReaction(itemId: EventOrTransactionId, key: String) async throws -> Bool {
if let error = toggleReactionItemIdKeyThrowableError {
throw error
}
@@ -24492,7 +24818,11 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline, @unchecked Sendable {
DispatchQueue.main.async {
self.toggleReactionItemIdKeyReceivedInvocations.append((itemId: itemId, key: key))
}
try await toggleReactionItemIdKeyClosure?(itemId, key)
if let toggleReactionItemIdKeyClosure = toggleReactionItemIdKeyClosure {
return try await toggleReactionItemIdKeyClosure(itemId, key)
} else {
return toggleReactionItemIdKeyReturnValue
}
}
//MARK: - unpinEvent

View File

@@ -80,7 +80,6 @@ private extension RoomMember {
membership: proxy.membership,
isNameAmbiguous: proxy.disambiguatedDisplayName != proxy.displayName,
powerLevel: proxy.powerLevel.rustPowerLevel,
normalizedPowerLevel: proxy.powerLevel.rustPowerLevel,
isIgnored: proxy.isIgnored,
suggestedRoleForPowerLevel: proxy.role.rustRole,
membershipChangeReason: proxy.membershipChangeReason)

View File

@@ -9,7 +9,7 @@ import Foundation
import MatrixRustSDK
enum TraceLogPack: Codable, CaseIterable {
case eventCache, sendQueue, timeline, notificationClient
case eventCache, sendQueue, timeline, notificationClient, syncProfiling
var title: String {
switch self {
@@ -17,6 +17,7 @@ enum TraceLogPack: Codable, CaseIterable {
case .sendQueue: "Send queue"
case .timeline: "Timeline"
case .notificationClient: "Notification client"
case .syncProfiling: "Sync profiling"
}
}
}
@@ -29,6 +30,7 @@ extension TraceLogPack {
case .sendQueue: self = .sendQueue
case .timeline: self = .timeline
case .notificationClient: self = .notificationClient
case .syncProfiling: self = .syncProfiling
}
}
@@ -38,6 +40,7 @@ extension TraceLogPack {
case .sendQueue: .sendQueue
case .timeline: .timeline
case .notificationClient: .notificationClient
case .syncProfiling: .syncProfiling
}
}
}

View File

@@ -76,31 +76,25 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
}
async let useEncryption = (try? room.latestEncryptionState() == .encrypted) ?? false
async let isDirect = room.isDirect()
let widgetSettings: WidgetSettings
async let intent = room.joinCallIntent
let widgetSettings: WidgetSettings
do {
widgetSettings = try await newVirtualElementCallWidget(props: .init(elementCallUrl: baseURL.absoluteString,
widgetId: widgetID,
parentUrl: nil,
header: .appBar,
hideHeader: true,
preload: nil,
fontScale: nil,
appPrompt: false,
confineToRoom: true,
font: nil,
encryption: useEncryption ? .perParticipantKeys : .unencrypted,
intent: .startCall,
hideScreensharing: false,
posthogUserId: nil,
posthogApiHost: analyticsConfiguration?.posthogAPIHost,
posthogApiKey: analyticsConfiguration?.posthogAPIKey,
rageshakeSubmitUrl: rageshakeURL,
sentryDsn: analyticsConfiguration?.sentryDSN,
sentryEnvironment: nil,
controlledMediaDevices: !ProcessInfo.processInfo.isiOSAppOnMac,
sendNotificationType: isDirect ? .ring : .notification))
sentryEnvironment: nil),
config: .init(intent: intent,
skipLobby: true, // Should be nil, but needs a new EC.
preload: false)) // Should be nil, but needs a new EC.
} catch {
MXLog.error("Failed to build widget settings: \(error)")
return .failure(.failedBuildingWidgetSettings)

View File

@@ -0,0 +1,21 @@
//
// Copyright 2025 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.
//
import MatrixRustSDK
extension RoomProtocol {
var joinCallIntent: Intent {
get async {
switch await (hasActiveRoomCall(), isDirect()) {
case (true, true): .joinExistingDm
case (true, false): .joinExisting
case (false, true): .startCallDm
case (false, false): .startCall
}
}
}
}

View File

@@ -0,0 +1,34 @@
//
// Copyright 2025 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.
//
import MatrixRustSDK
import XCTest
@testable import ElementX
class RoomTests: XCTestCase {
func testCallIntent() async throws {
let room = RoomSDKMock()
room.hasActiveRoomCallReturnValue = false
room.isDirectReturnValue = false
var callIntent = await room.joinCallIntent
XCTAssertEqual(callIntent, .startCall)
room.isDirectReturnValue = true
callIntent = await room.joinCallIntent
XCTAssertEqual(callIntent, .startCallDm)
room.hasActiveRoomCallReturnValue = true
callIntent = await room.joinCallIntent
XCTAssertEqual(callIntent, .joinExistingDm)
room.isDirectReturnValue = false
callIntent = await room.joinCallIntent
XCTAssertEqual(callIntent, .joinExisting)
}
}

View File

@@ -48,7 +48,7 @@ settings:
ENABLE_BITCODE: false
APP_NAME: ElementX
KEYCHAIN_ACCESS_GROUP_IDENTIFIER: "$(DEVELOPMENT_TEAM).$(BASE_BUNDLE_IDENTIFIER)"
MARKETING_VERSION: 25.09.5
MARKETING_VERSION: 25.09.12
CURRENT_PROJECT_VERSION: 1
SUPPORTS_MACCATALYST: false
@@ -68,7 +68,7 @@ packages:
# Element/Matrix dependencies
MatrixRustSDK:
url: https://github.com/element-hq/matrix-rust-components-swift
exactVersion: 25.09.01
exactVersion: 25.09.15
# path: ../matrix-rust-sdk
Compound:
url: https://github.com/element-hq/compound-ios