mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Send Intentional Mentions (#1929)
* updated sdks * fix waveform * implementation completed * intentional mentions test * removed unused var * suggestion
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 54;
|
objectVersion = 56;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -615,6 +615,7 @@
|
|||||||
A74438ED16F8683A4B793E6A /* AnalyticsSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BCE3FAF40932AC7C7639AC4 /* AnalyticsSettingsScreenViewModel.swift */; };
|
A74438ED16F8683A4B793E6A /* AnalyticsSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BCE3FAF40932AC7C7639AC4 /* AnalyticsSettingsScreenViewModel.swift */; };
|
||||||
A7BEE8216B4B12BE4C0F2C3F /* AppLockSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892EF45CCC5D2BF0FD1F770C /* AppLockSettingsScreenViewModel.swift */; };
|
A7BEE8216B4B12BE4C0F2C3F /* AppLockSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892EF45CCC5D2BF0FD1F770C /* AppLockSettingsScreenViewModel.swift */; };
|
||||||
A7D48E44D485B143AADDB77D /* Strings+Untranslated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A18F6CE4D694D21E4EA9B25 /* Strings+Untranslated.swift */; };
|
A7D48E44D485B143AADDB77D /* Strings+Untranslated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A18F6CE4D694D21E4EA9B25 /* Strings+Untranslated.swift */; };
|
||||||
|
A7E7D2FF2AE2A42200EAFDBC /* IntentionalMentions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E7D2FE2AE2A42200EAFDBC /* IntentionalMentions.swift */; };
|
||||||
A7FD7B992E6EE6E5A8429197 /* RoomSummaryDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142808B69851451AC32A2CEA /* RoomSummaryDetails.swift */; };
|
A7FD7B992E6EE6E5A8429197 /* RoomSummaryDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142808B69851451AC32A2CEA /* RoomSummaryDetails.swift */; };
|
||||||
A816F7087C495D85048AC50E /* RoomMemberDetailsScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B6E30BB748F3F480F077969 /* RoomMemberDetailsScreenModels.swift */; };
|
A816F7087C495D85048AC50E /* RoomMemberDetailsScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B6E30BB748F3F480F077969 /* RoomMemberDetailsScreenModels.swift */; };
|
||||||
A851635B3255C6DC07034A12 /* RoomScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8108C8F0ACF6A7EB72D0117 /* RoomScreenCoordinator.swift */; };
|
A851635B3255C6DC07034A12 /* RoomScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8108C8F0ACF6A7EB72D0117 /* RoomScreenCoordinator.swift */; };
|
||||||
@@ -1048,7 +1049,7 @@
|
|||||||
127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentValuePublisher.swift; sourceTree = "<group>"; };
|
127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentValuePublisher.swift; sourceTree = "<group>"; };
|
||||||
12EDAFB64FA5F6812D54F39A /* MigrationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigrationScreenViewModel.swift; sourceTree = "<group>"; };
|
12EDAFB64FA5F6812D54F39A /* MigrationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigrationScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
12F1E7F9C2BE8BB751037826 /* WaitlistScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenCoordinator.swift; sourceTree = "<group>"; };
|
12F1E7F9C2BE8BB751037826 /* WaitlistScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||||
1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; path = IntegrationTests.xctestplan; sourceTree = "<group>"; };
|
1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = IntegrationTests.xctestplan; sourceTree = "<group>"; };
|
||||||
130ED565A078F7E0B59D9D25 /* UNTextInputNotificationResponse+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNTextInputNotificationResponse+Creator.swift"; sourceTree = "<group>"; };
|
130ED565A078F7E0B59D9D25 /* UNTextInputNotificationResponse+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNTextInputNotificationResponse+Creator.swift"; sourceTree = "<group>"; };
|
||||||
13802897C7AFA360EA74C0B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
13802897C7AFA360EA74C0B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||||
1423AB065857FA546444DB15 /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
|
1423AB065857FA546444DB15 /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
|
||||||
@@ -1454,7 +1455,7 @@
|
|||||||
8D55702474F279D910D2D162 /* RoomStateEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilder.swift; sourceTree = "<group>"; };
|
8D55702474F279D910D2D162 /* RoomStateEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilder.swift; sourceTree = "<group>"; };
|
||||||
8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
|
8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.swift; sourceTree = "<group>"; };
|
8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.swift; sourceTree = "<group>"; };
|
||||||
8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; path = UITests.xctestplan; sourceTree = "<group>"; };
|
8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UITests.xctestplan; sourceTree = "<group>"; };
|
||||||
8E1BBA73B611EDEEA6E20E05 /* InvitesScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvitesScreenModels.swift; sourceTree = "<group>"; };
|
8E1BBA73B611EDEEA6E20E05 /* InvitesScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvitesScreenModels.swift; sourceTree = "<group>"; };
|
||||||
8EC57A32ABC80D774CC663DB /* SettingsScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenUITests.swift; sourceTree = "<group>"; };
|
8EC57A32ABC80D774CC663DB /* SettingsScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenUITests.swift; sourceTree = "<group>"; };
|
||||||
8F21ED7205048668BEB44A38 /* AppActivityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppActivityView.swift; sourceTree = "<group>"; };
|
8F21ED7205048668BEB44A38 /* AppActivityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppActivityView.swift; sourceTree = "<group>"; };
|
||||||
@@ -1530,6 +1531,7 @@
|
|||||||
A6C11AD9813045E44F950410 /* ElementCallWidgetDriverProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementCallWidgetDriverProtocol.swift; sourceTree = "<group>"; };
|
A6C11AD9813045E44F950410 /* ElementCallWidgetDriverProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementCallWidgetDriverProtocol.swift; sourceTree = "<group>"; };
|
||||||
A73A07BAEDD74C48795A996A /* AsyncSequence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncSequence.swift; sourceTree = "<group>"; };
|
A73A07BAEDD74C48795A996A /* AsyncSequence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncSequence.swift; sourceTree = "<group>"; };
|
||||||
A7C4EA55DA62F9D0F984A2AE /* CollapsibleTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollapsibleTimelineItem.swift; sourceTree = "<group>"; };
|
A7C4EA55DA62F9D0F984A2AE /* CollapsibleTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollapsibleTimelineItem.swift; sourceTree = "<group>"; };
|
||||||
|
A7E7D2FE2AE2A42200EAFDBC /* IntentionalMentions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntentionalMentions.swift; sourceTree = "<group>"; };
|
||||||
A861DA5932B128FE1DCB5CE2 /* InviteUsersScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteUsersScreenCoordinator.swift; sourceTree = "<group>"; };
|
A861DA5932B128FE1DCB5CE2 /* InviteUsersScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteUsersScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||||
A8903A9F615BBD0E6D7CD133 /* ApplicationProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationProtocol.swift; sourceTree = "<group>"; };
|
A8903A9F615BBD0E6D7CD133 /* ApplicationProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationProtocol.swift; sourceTree = "<group>"; };
|
||||||
A9FAFE1C2149E6AC8156ED2B /* Collection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection.swift; sourceTree = "<group>"; };
|
A9FAFE1C2149E6AC8156ED2B /* Collection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection.swift; sourceTree = "<group>"; };
|
||||||
@@ -1582,7 +1584,7 @@
|
|||||||
B4CFE236419E830E8946639C /* Analytics+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Analytics+SwiftUI.swift"; sourceTree = "<group>"; };
|
B4CFE236419E830E8946639C /* Analytics+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Analytics+SwiftUI.swift"; sourceTree = "<group>"; };
|
||||||
B590BD4507D4F0A377FDE01A /* LoadableAvatarImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadableAvatarImage.swift; sourceTree = "<group>"; };
|
B590BD4507D4F0A377FDE01A /* LoadableAvatarImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadableAvatarImage.swift; sourceTree = "<group>"; };
|
||||||
B5B243E7818E5E9F6A4EDC7A /* NoticeRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeRoomTimelineView.swift; sourceTree = "<group>"; };
|
B5B243E7818E5E9F6A4EDC7A /* NoticeRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||||
B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; path = ConfettiScene.scn; sourceTree = "<group>"; };
|
B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = ConfettiScene.scn; sourceTree = "<group>"; };
|
||||||
B6311F21F911E23BE4DF51B4 /* ReadMarkerRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMarkerRoomTimelineView.swift; sourceTree = "<group>"; };
|
B6311F21F911E23BE4DF51B4 /* ReadMarkerRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMarkerRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||||
B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModel.swift; sourceTree = "<group>"; };
|
B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
B697816AF93DA06EC58C5D70 /* WaitlistScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
B697816AF93DA06EC58C5D70 /* WaitlistScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
@@ -1683,7 +1685,7 @@
|
|||||||
CD95B3714F806AC9CF9A557B /* ComposerToolbarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarViewModel.swift; sourceTree = "<group>"; };
|
CD95B3714F806AC9CF9A557B /* ComposerToolbarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarViewModel.swift; sourceTree = "<group>"; };
|
||||||
CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = "<group>"; };
|
CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = "<group>"; };
|
||||||
CEE0E6043EFCF6FD2A341861 /* TimelineReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineReplyView.swift; sourceTree = "<group>"; };
|
CEE0E6043EFCF6FD2A341861 /* TimelineReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineReplyView.swift; sourceTree = "<group>"; };
|
||||||
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
||||||
CF48AF076424DBC1615C74AD /* AuthenticationServiceProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProxy.swift; sourceTree = "<group>"; };
|
CF48AF076424DBC1615C74AD /* AuthenticationServiceProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProxy.swift; sourceTree = "<group>"; };
|
||||||
D0140615D2232612C813FD6C /* EncryptedHistoryRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedHistoryRoomTimelineItem.swift; sourceTree = "<group>"; };
|
D0140615D2232612C813FD6C /* EncryptedHistoryRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedHistoryRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||||
D071F86CD47582B9196C9D16 /* UserDiscoverySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoverySection.swift; sourceTree = "<group>"; };
|
D071F86CD47582B9196C9D16 /* UserDiscoverySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoverySection.swift; sourceTree = "<group>"; };
|
||||||
@@ -1779,7 +1781,7 @@
|
|||||||
ECF79FB25E2D4BD6F50CE7C9 /* RoomMembersListScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListScreenViewModel.swift; sourceTree = "<group>"; };
|
ECF79FB25E2D4BD6F50CE7C9 /* RoomMembersListScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = "<group>"; };
|
ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = "<group>"; };
|
||||||
ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; };
|
ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; };
|
||||||
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = "<group>"; };
|
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = message.caf; sourceTree = "<group>"; };
|
||||||
ED983D4DCA5AFA6E1ED96099 /* StateRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StateRoomTimelineView.swift; sourceTree = "<group>"; };
|
ED983D4DCA5AFA6E1ED96099 /* StateRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StateRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||||
EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = "<group>"; };
|
EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = "<group>"; };
|
||||||
EE378083653EF0C9B5E9D580 /* EmoteRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItemContent.swift; sourceTree = "<group>"; };
|
EE378083653EF0C9B5E9D580 /* EmoteRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItemContent.swift; sourceTree = "<group>"; };
|
||||||
@@ -1793,7 +1795,7 @@
|
|||||||
F174A5627CDB3CAF280D1880 /* EmojiPickerScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenModels.swift; sourceTree = "<group>"; };
|
F174A5627CDB3CAF280D1880 /* EmojiPickerScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenModels.swift; sourceTree = "<group>"; };
|
||||||
F17EFA1D3D09FC2F9C5E1CB2 /* MediaProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProvider.swift; sourceTree = "<group>"; };
|
F17EFA1D3D09FC2F9C5E1CB2 /* MediaProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProvider.swift; sourceTree = "<group>"; };
|
||||||
F1B8500C152BC59445647DA8 /* UnsupportedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsupportedRoomTimelineItem.swift; sourceTree = "<group>"; };
|
F1B8500C152BC59445647DA8 /* UnsupportedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsupportedRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||||
F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
||||||
F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = "<group>"; };
|
F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = "<group>"; };
|
||||||
F348B5F2C12F9D4F4B4D3884 /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = "<group>"; };
|
F348B5F2C12F9D4F4B4D3884 /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||||
F36C0A6D59717193F49EA986 /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = "<group>"; };
|
F36C0A6D59717193F49EA986 /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = "<group>"; };
|
||||||
@@ -4434,6 +4436,7 @@
|
|||||||
2F2FED77226A43559F009463 /* TimelineController */,
|
2F2FED77226A43559F009463 /* TimelineController */,
|
||||||
6B0910BCE4F1B02F124E1A09 /* TimelineItemContent */,
|
6B0910BCE4F1B02F124E1A09 /* TimelineItemContent */,
|
||||||
95BE1C7CB2C80344FF0BE724 /* TimelineItems */,
|
95BE1C7CB2C80344FF0BE724 /* TimelineItems */,
|
||||||
|
A7E7D2FE2AE2A42200EAFDBC /* IntentionalMentions.swift */,
|
||||||
);
|
);
|
||||||
path = Timeline;
|
path = Timeline;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -5508,6 +5511,7 @@
|
|||||||
339BC18777912E1989F2F17D /* Section.swift in Sources */,
|
339BC18777912E1989F2F17D /* Section.swift in Sources */,
|
||||||
F833D5B5BE6707F961FA88DB /* SecureBackupController.swift in Sources */,
|
F833D5B5BE6707F961FA88DB /* SecureBackupController.swift in Sources */,
|
||||||
0C88044649BAEE6C49BFC43A /* SecureBackupControllerProtocol.swift in Sources */,
|
0C88044649BAEE6C49BFC43A /* SecureBackupControllerProtocol.swift in Sources */,
|
||||||
|
A7E7D2FF2AE2A42200EAFDBC /* IntentionalMentions.swift in Sources */,
|
||||||
21F29351EDD7B2A5534EE862 /* SecureBackupKeyBackupScreen.swift in Sources */,
|
21F29351EDD7B2A5534EE862 /* SecureBackupKeyBackupScreen.swift in Sources */,
|
||||||
5BC6C4ADFE7F2A795ECDE130 /* SecureBackupKeyBackupScreenCoordinator.swift in Sources */,
|
5BC6C4ADFE7F2A795ECDE130 /* SecureBackupKeyBackupScreenCoordinator.swift in Sources */,
|
||||||
B7888FC1E1DEF816D175C8D6 /* SecureBackupKeyBackupScreenModels.swift in Sources */,
|
B7888FC1E1DEF816D175C8D6 /* SecureBackupKeyBackupScreenModels.swift in Sources */,
|
||||||
@@ -6368,7 +6372,7 @@
|
|||||||
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 1.1.23;
|
version = 1.1.24;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
||||||
@@ -6384,7 +6388,7 @@
|
|||||||
repositoryURL = "https://github.com/matrix-org/matrix-wysiwyg-composer-swift";
|
repositoryURL = "https://github.com/matrix-org/matrix-wysiwyg-composer-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 2.14.3;
|
version = 2.14.4;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = {
|
96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = {
|
||||||
|
|||||||
@@ -128,8 +128,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "c5ca416942b4a4af82126ac2bf7f08ef7af5bb19",
|
"revision" : "9529d89222115f1013f313cff36cec562cec1a69",
|
||||||
"version" : "1.1.23"
|
"version" : "1.1.24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -137,8 +137,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift",
|
"location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "a82eece5d3ce6aff87bcd5460f04bedc9e2492cf",
|
"revision" : "e60d0ffa9fbb1368bd837c94dede2d8d48952c7f",
|
||||||
"version" : "2.14.3"
|
"version" : "2.14.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
{
|
{
|
||||||
"identity" : "swiftui-introspect",
|
"identity" : "swiftui-introspect",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/siteline/SwiftUI-Introspect",
|
"location" : "https://github.com/siteline/SwiftUI-Introspect.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
|
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
|
||||||
"version" : "0.9.2"
|
"version" : "0.9.2"
|
||||||
|
|||||||
@@ -249,7 +249,9 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let roomProxy = await userSession.clientProxy.roomForIdentifier(roomID)
|
let roomProxy = await userSession.clientProxy.roomForIdentifier(roomID)
|
||||||
switch await roomProxy?.sendMessage(replyText, html: nil) {
|
switch await roomProxy?.sendMessage(replyText,
|
||||||
|
html: nil,
|
||||||
|
intentionalMentions: .empty) {
|
||||||
case .success:
|
case .success:
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1625,23 +1625,23 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
}
|
}
|
||||||
//MARK: - sendMessage
|
//MARK: - sendMessage
|
||||||
|
|
||||||
var sendMessageHtmlInReplyToCallsCount = 0
|
var sendMessageHtmlInReplyToIntentionalMentionsCallsCount = 0
|
||||||
var sendMessageHtmlInReplyToCalled: Bool {
|
var sendMessageHtmlInReplyToIntentionalMentionsCalled: Bool {
|
||||||
return sendMessageHtmlInReplyToCallsCount > 0
|
return sendMessageHtmlInReplyToIntentionalMentionsCallsCount > 0
|
||||||
}
|
}
|
||||||
var sendMessageHtmlInReplyToReceivedArguments: (message: String, html: String?, eventID: String?)?
|
var sendMessageHtmlInReplyToIntentionalMentionsReceivedArguments: (message: String, html: String?, eventID: String?, intentionalMentions: IntentionalMentions)?
|
||||||
var sendMessageHtmlInReplyToReceivedInvocations: [(message: String, html: String?, eventID: String?)] = []
|
var sendMessageHtmlInReplyToIntentionalMentionsReceivedInvocations: [(message: String, html: String?, eventID: String?, intentionalMentions: IntentionalMentions)] = []
|
||||||
var sendMessageHtmlInReplyToReturnValue: Result<Void, RoomProxyError>!
|
var sendMessageHtmlInReplyToIntentionalMentionsReturnValue: Result<Void, RoomProxyError>!
|
||||||
var sendMessageHtmlInReplyToClosure: ((String, String?, String?) async -> Result<Void, RoomProxyError>)?
|
var sendMessageHtmlInReplyToIntentionalMentionsClosure: ((String, String?, String?, IntentionalMentions) async -> Result<Void, RoomProxyError>)?
|
||||||
|
|
||||||
func sendMessage(_ message: String, html: String?, inReplyTo eventID: String?) async -> Result<Void, RoomProxyError> {
|
func sendMessage(_ message: String, html: String?, inReplyTo eventID: String?, intentionalMentions: IntentionalMentions) async -> Result<Void, RoomProxyError> {
|
||||||
sendMessageHtmlInReplyToCallsCount += 1
|
sendMessageHtmlInReplyToIntentionalMentionsCallsCount += 1
|
||||||
sendMessageHtmlInReplyToReceivedArguments = (message: message, html: html, eventID: eventID)
|
sendMessageHtmlInReplyToIntentionalMentionsReceivedArguments = (message: message, html: html, eventID: eventID, intentionalMentions: intentionalMentions)
|
||||||
sendMessageHtmlInReplyToReceivedInvocations.append((message: message, html: html, eventID: eventID))
|
sendMessageHtmlInReplyToIntentionalMentionsReceivedInvocations.append((message: message, html: html, eventID: eventID, intentionalMentions: intentionalMentions))
|
||||||
if let sendMessageHtmlInReplyToClosure = sendMessageHtmlInReplyToClosure {
|
if let sendMessageHtmlInReplyToIntentionalMentionsClosure = sendMessageHtmlInReplyToIntentionalMentionsClosure {
|
||||||
return await sendMessageHtmlInReplyToClosure(message, html, eventID)
|
return await sendMessageHtmlInReplyToIntentionalMentionsClosure(message, html, eventID, intentionalMentions)
|
||||||
} else {
|
} else {
|
||||||
return sendMessageHtmlInReplyToReturnValue
|
return sendMessageHtmlInReplyToIntentionalMentionsReturnValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//MARK: - toggleReaction
|
//MARK: - toggleReaction
|
||||||
@@ -1788,23 +1788,23 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
}
|
}
|
||||||
//MARK: - editMessage
|
//MARK: - editMessage
|
||||||
|
|
||||||
var editMessageHtmlOriginalCallsCount = 0
|
var editMessageHtmlOriginalIntentionalMentionsCallsCount = 0
|
||||||
var editMessageHtmlOriginalCalled: Bool {
|
var editMessageHtmlOriginalIntentionalMentionsCalled: Bool {
|
||||||
return editMessageHtmlOriginalCallsCount > 0
|
return editMessageHtmlOriginalIntentionalMentionsCallsCount > 0
|
||||||
}
|
}
|
||||||
var editMessageHtmlOriginalReceivedArguments: (newMessage: String, html: String?, eventID: String)?
|
var editMessageHtmlOriginalIntentionalMentionsReceivedArguments: (newMessage: String, html: String?, eventID: String, intentionalMentions: IntentionalMentions)?
|
||||||
var editMessageHtmlOriginalReceivedInvocations: [(newMessage: String, html: String?, eventID: String)] = []
|
var editMessageHtmlOriginalIntentionalMentionsReceivedInvocations: [(newMessage: String, html: String?, eventID: String, intentionalMentions: IntentionalMentions)] = []
|
||||||
var editMessageHtmlOriginalReturnValue: Result<Void, RoomProxyError>!
|
var editMessageHtmlOriginalIntentionalMentionsReturnValue: Result<Void, RoomProxyError>!
|
||||||
var editMessageHtmlOriginalClosure: ((String, String?, String) async -> Result<Void, RoomProxyError>)?
|
var editMessageHtmlOriginalIntentionalMentionsClosure: ((String, String?, String, IntentionalMentions) async -> Result<Void, RoomProxyError>)?
|
||||||
|
|
||||||
func editMessage(_ newMessage: String, html: String?, original eventID: String) async -> Result<Void, RoomProxyError> {
|
func editMessage(_ newMessage: String, html: String?, original eventID: String, intentionalMentions: IntentionalMentions) async -> Result<Void, RoomProxyError> {
|
||||||
editMessageHtmlOriginalCallsCount += 1
|
editMessageHtmlOriginalIntentionalMentionsCallsCount += 1
|
||||||
editMessageHtmlOriginalReceivedArguments = (newMessage: newMessage, html: html, eventID: eventID)
|
editMessageHtmlOriginalIntentionalMentionsReceivedArguments = (newMessage: newMessage, html: html, eventID: eventID, intentionalMentions: intentionalMentions)
|
||||||
editMessageHtmlOriginalReceivedInvocations.append((newMessage: newMessage, html: html, eventID: eventID))
|
editMessageHtmlOriginalIntentionalMentionsReceivedInvocations.append((newMessage: newMessage, html: html, eventID: eventID, intentionalMentions: intentionalMentions))
|
||||||
if let editMessageHtmlOriginalClosure = editMessageHtmlOriginalClosure {
|
if let editMessageHtmlOriginalIntentionalMentionsClosure = editMessageHtmlOriginalIntentionalMentionsClosure {
|
||||||
return await editMessageHtmlOriginalClosure(newMessage, html, eventID)
|
return await editMessageHtmlOriginalIntentionalMentionsClosure(newMessage, html, eventID, intentionalMentions)
|
||||||
} else {
|
} else {
|
||||||
return editMessageHtmlOriginalReturnValue
|
return editMessageHtmlOriginalIntentionalMentionsReturnValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//MARK: - redact
|
//MARK: - redact
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import UIKit
|
|||||||
import WysiwygComposer
|
import WysiwygComposer
|
||||||
|
|
||||||
enum ComposerToolbarViewModelAction {
|
enum ComposerToolbarViewModelAction {
|
||||||
case sendMessage(plain: String, html: String?, mode: RoomScreenComposerMode)
|
case sendMessage(plain: String, html: String?, mode: RoomScreenComposerMode, intentionalMentions: IntentionalMentions)
|
||||||
case displayCameraPicker
|
case displayCameraPicker
|
||||||
case displayMediaPicker
|
case displayMediaPicker
|
||||||
case displayDocumentPicker
|
case displayDocumentPicker
|
||||||
|
|||||||
@@ -111,7 +111,10 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
|||||||
let sendHTML = ServiceLocator.shared.settings.richTextEditorEnabled
|
let sendHTML = ServiceLocator.shared.settings.richTextEditorEnabled
|
||||||
actionsSubject.send(.sendMessage(plain: wysiwygViewModel.content.markdown,
|
actionsSubject.send(.sendMessage(plain: wysiwygViewModel.content.markdown,
|
||||||
html: sendHTML ? wysiwygViewModel.content.html : nil,
|
html: sendHTML ? wysiwygViewModel.content.html : nil,
|
||||||
mode: state.composerMode))
|
mode: state.composerMode,
|
||||||
|
intentionalMentions: wysiwygViewModel
|
||||||
|
.getMentionsState()
|
||||||
|
.toIntentionalMentions()))
|
||||||
}
|
}
|
||||||
case .cancelReply:
|
case .cancelReply:
|
||||||
set(mode: .default)
|
set(mode: .default)
|
||||||
|
|||||||
@@ -171,8 +171,13 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
|||||||
|
|
||||||
func process(composerAction: ComposerToolbarViewModelAction) {
|
func process(composerAction: ComposerToolbarViewModelAction) {
|
||||||
switch composerAction {
|
switch composerAction {
|
||||||
case .sendMessage(let message, let html, let mode):
|
case .sendMessage(let message, let html, let mode, let intentionalMentions):
|
||||||
Task { await sendCurrentMessage(message, html: html, mode: mode) }
|
Task {
|
||||||
|
await sendCurrentMessage(message,
|
||||||
|
html: html,
|
||||||
|
mode: mode,
|
||||||
|
intentionalMentions: intentionalMentions)
|
||||||
|
}
|
||||||
case .displayCameraPicker:
|
case .displayCameraPicker:
|
||||||
actionsSubject.send(.displayCameraPicker)
|
actionsSubject.send(.displayCameraPicker)
|
||||||
case .displayMediaPicker:
|
case .displayMediaPicker:
|
||||||
@@ -468,7 +473,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
|||||||
return eventTimelineItem.properties.reactions.isEmpty && eventTimelineItem.sender == otherEventTimelineItem.sender
|
return eventTimelineItem.properties.reactions.isEmpty && eventTimelineItem.sender == otherEventTimelineItem.sender
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sendCurrentMessage(_ message: String, html: String?, mode: RoomScreenComposerMode) async {
|
private func sendCurrentMessage(_ message: String, html: String?, mode: RoomScreenComposerMode, intentionalMentions: IntentionalMentions) async {
|
||||||
guard !message.isEmpty else {
|
guard !message.isEmpty else {
|
||||||
fatalError("This message should never be empty")
|
fatalError("This message should never be empty")
|
||||||
}
|
}
|
||||||
@@ -477,11 +482,19 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
|||||||
|
|
||||||
switch mode {
|
switch mode {
|
||||||
case .reply(let itemId, _, _):
|
case .reply(let itemId, _, _):
|
||||||
await timelineController.sendMessage(message, html: html, inReplyTo: itemId)
|
await timelineController.sendMessage(message,
|
||||||
|
html: html,
|
||||||
|
inReplyTo: itemId,
|
||||||
|
intentionalMentions: intentionalMentions)
|
||||||
case .edit(let originalItemId):
|
case .edit(let originalItemId):
|
||||||
await timelineController.editMessage(message, html: html, original: originalItemId)
|
await timelineController.editMessage(message,
|
||||||
|
html: html,
|
||||||
|
original: originalItemId,
|
||||||
|
intentionalMentions: intentionalMentions)
|
||||||
case .default:
|
case .default:
|
||||||
await timelineController.sendMessage(message, html: html)
|
await timelineController.sendMessage(message,
|
||||||
|
html: html,
|
||||||
|
intentionalMentions: intentionalMentions)
|
||||||
case .recordVoiceMessage, .previewVoiceMessage:
|
case .recordVoiceMessage, .previewVoiceMessage:
|
||||||
fatalError("invalid composer mode.")
|
fatalError("invalid composer mode.")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ private struct ElementCallWidgetMessage: Codable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ElementCallWidgetDriver: WidgetPermissionsProvider, ElementCallWidgetDriverProtocol {
|
class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriverProtocol {
|
||||||
private let room: RoomProtocol
|
private let room: RoomProtocol
|
||||||
private var widgetDriver: WidgetDriverAndHandle?
|
private var widgetDriver: WidgetDriverAndHandle?
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ class ElementCallWidgetDriver: WidgetPermissionsProvider, ElementCallWidgetDrive
|
|||||||
appPrompt: false,
|
appPrompt: false,
|
||||||
skipLobby: true,
|
skipLobby: true,
|
||||||
confineToRoom: true,
|
confineToRoom: true,
|
||||||
fonts: nil,
|
font: nil,
|
||||||
analyticsId: nil)) else {
|
analyticsId: nil)) else {
|
||||||
return .failure(.failedBuildingWidgetSettings)
|
return .failure(.failedBuildingWidgetSettings)
|
||||||
}
|
}
|
||||||
@@ -114,7 +114,7 @@ class ElementCallWidgetDriver: WidgetPermissionsProvider, ElementCallWidgetDrive
|
|||||||
MXLog.debug("Stopped widget driver")
|
MXLog.debug("Stopped widget driver")
|
||||||
}
|
}
|
||||||
|
|
||||||
await widgetDriver.driver.run(room: room, permissionsProvider: self)
|
await widgetDriver.driver.run(room: room, capabilitiesProvider: self)
|
||||||
}
|
}
|
||||||
|
|
||||||
return .success(url)
|
return .success(url)
|
||||||
@@ -133,10 +133,10 @@ class ElementCallWidgetDriver: WidgetPermissionsProvider, ElementCallWidgetDrive
|
|||||||
return .success(result)
|
return .success(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - WidgetPermissionsProvider
|
// MARK: - WidgetCapabilitiesProvider
|
||||||
|
|
||||||
func acquirePermissions(permissions: MatrixRustSDK.WidgetPermissions) -> MatrixRustSDK.WidgetPermissions {
|
func acquireCapabilities(capabilities: WidgetPermissions) -> WidgetPermissions {
|
||||||
permissions
|
capabilities
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Private
|
// MARK: - Private
|
||||||
|
|||||||
@@ -257,13 +257,18 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func sendMessage(_ message: String, html: String?, inReplyTo eventID: String? = nil) async -> Result<Void, RoomProxyError> {
|
func sendMessage(_ message: String,
|
||||||
|
html: String?,
|
||||||
|
inReplyTo eventID: String? = nil,
|
||||||
|
intentionalMentions: IntentionalMentions) async -> Result<Void, RoomProxyError> {
|
||||||
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
||||||
defer {
|
defer {
|
||||||
sendMessageBackgroundTask?.stop()
|
sendMessageBackgroundTask?.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
let messageContent = buildMessageContentFor(message, html: html)
|
let messageContent = buildMessageContentFor(message,
|
||||||
|
html: html,
|
||||||
|
intentionalMentions: intentionalMentions.toRustMentions())
|
||||||
|
|
||||||
return await Task.dispatch(on: messageSendingDispatchQueue) {
|
return await Task.dispatch(on: messageSendingDispatchQueue) {
|
||||||
do {
|
do {
|
||||||
@@ -435,13 +440,18 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func editMessage(_ message: String, html: String?, original eventID: String) async -> Result<Void, RoomProxyError> {
|
func editMessage(_ message: String,
|
||||||
|
html: String?,
|
||||||
|
original eventID: String,
|
||||||
|
intentionalMentions: IntentionalMentions) async -> Result<Void, RoomProxyError> {
|
||||||
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
||||||
defer {
|
defer {
|
||||||
sendMessageBackgroundTask?.stop()
|
sendMessageBackgroundTask?.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
let messageContent = buildMessageContentFor(message, html: html)
|
let messageContent = buildMessageContentFor(message,
|
||||||
|
html: html,
|
||||||
|
intentionalMentions: intentionalMentions.toRustMentions())
|
||||||
|
|
||||||
return await Task.dispatch(on: messageSendingDispatchQueue) {
|
return await Task.dispatch(on: messageSendingDispatchQueue) {
|
||||||
do {
|
do {
|
||||||
@@ -718,26 +728,29 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
|
|
||||||
// MARK: - Private
|
// MARK: - Private
|
||||||
|
|
||||||
private func buildMessageContentFor(_ message: String, html: String?) -> RoomMessageEventContentWithoutRelation {
|
private func buildMessageContentFor(_ message: String,
|
||||||
|
html: String?,
|
||||||
|
intentionalMentions: Mentions) -> RoomMessageEventContentWithoutRelation {
|
||||||
let emoteSlashCommand = "/me "
|
let emoteSlashCommand = "/me "
|
||||||
let isEmote: Bool = message.starts(with: emoteSlashCommand)
|
let isEmote: Bool = message.starts(with: emoteSlashCommand)
|
||||||
|
|
||||||
guard isEmote else {
|
let content: RoomMessageEventContentWithoutRelation
|
||||||
|
if isEmote {
|
||||||
|
let emoteMessage = String(message.dropFirst(emoteSlashCommand.count))
|
||||||
|
|
||||||
|
var emoteHtml: String?
|
||||||
if let html {
|
if let html {
|
||||||
return messageEventContentFromHtml(body: message, htmlBody: html)
|
emoteHtml = String(html.dropFirst(emoteSlashCommand.count))
|
||||||
|
}
|
||||||
|
content = buildEmoteMessageContentFor(emoteMessage, html: emoteHtml)
|
||||||
|
} else {
|
||||||
|
if let html {
|
||||||
|
content = messageEventContentFromHtml(body: message, htmlBody: html)
|
||||||
} else {
|
} else {
|
||||||
return messageEventContentFromMarkdown(md: message)
|
content = messageEventContentFromMarkdown(md: message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return content.withMentions(mentions: intentionalMentions)
|
||||||
let emoteMessage = String(message.dropFirst(emoteSlashCommand.count))
|
|
||||||
|
|
||||||
var emoteHtml: String?
|
|
||||||
if let html {
|
|
||||||
emoteHtml = String(html.dropFirst(emoteSlashCommand.count))
|
|
||||||
}
|
|
||||||
|
|
||||||
return buildEmoteMessageContentFor(emoteMessage, html: emoteHtml)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func buildEmoteMessageContentFor(_ message: String, html: String?) -> RoomMessageEventContentWithoutRelation {
|
private func buildEmoteMessageContentFor(_ message: String, html: String?) -> RoomMessageEventContentWithoutRelation {
|
||||||
|
|||||||
@@ -96,7 +96,10 @@ protocol RoomProxyProtocol {
|
|||||||
|
|
||||||
func sendMessageEventContent(_ messageContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError>
|
func sendMessageEventContent(_ messageContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
func sendMessage(_ message: String, html: String?, inReplyTo eventID: String?) async -> Result<Void, RoomProxyError>
|
func sendMessage(_ message: String,
|
||||||
|
html: String?,
|
||||||
|
inReplyTo eventID: String?,
|
||||||
|
intentionalMentions: IntentionalMentions) async -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
func toggleReaction(_ reaction: String, to eventID: String) async -> Result<Void, RoomProxyError>
|
func toggleReaction(_ reaction: String, to eventID: String) async -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
@@ -134,7 +137,10 @@ protocol RoomProxyProtocol {
|
|||||||
/// Cancels a failed message given its transaction ID from the timeline
|
/// Cancels a failed message given its transaction ID from the timeline
|
||||||
func cancelSend(transactionID: String) async
|
func cancelSend(transactionID: String) async
|
||||||
|
|
||||||
func editMessage(_ newMessage: String, html: String?, original eventID: String) async -> Result<Void, RoomProxyError>
|
func editMessage(_ newMessage: String,
|
||||||
|
html: String?,
|
||||||
|
original eventID: String,
|
||||||
|
intentionalMentions: IntentionalMentions) async -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
func redact(_ eventID: String) async -> Result<Void, RoomProxyError>
|
func redact(_ eventID: String) async -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
@@ -197,8 +203,13 @@ extension RoomProxyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func sendMessage(_ message: String, html: String?) async -> Result<Void, RoomProxyError> {
|
func sendMessage(_ message: String,
|
||||||
await sendMessage(message, html: html, inReplyTo: nil)
|
html: String?,
|
||||||
|
intentionalMentions: IntentionalMentions) async -> Result<Void, RoomProxyError> {
|
||||||
|
await sendMessage(message,
|
||||||
|
html: html,
|
||||||
|
inReplyTo: nil,
|
||||||
|
intentionalMentions: intentionalMentions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoids to duplicate the same logic around in the app
|
// Avoids to duplicate the same logic around in the app
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2023 New Vector Ltd
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
import MatrixRustSDK
|
||||||
|
import WysiwygComposer
|
||||||
|
|
||||||
|
struct IntentionalMentions: Equatable {
|
||||||
|
let userIDs: Set<String>
|
||||||
|
let atRoom: Bool
|
||||||
|
|
||||||
|
static var empty: Self {
|
||||||
|
IntentionalMentions(userIDs: [], atRoom: false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension IntentionalMentions {
|
||||||
|
func toRustMentions() -> Mentions {
|
||||||
|
Mentions(userIds: Array(userIDs), room: atRoom)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension MentionsState {
|
||||||
|
func toIntentionalMentions() -> IntentionalMentions {
|
||||||
|
IntentionalMentions(userIDs: Set(userIds), atRoom: hasAtRoomMention)
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
-2
@@ -66,11 +66,17 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
|
|
||||||
func processItemTap(_ itemID: TimelineItemIdentifier) async -> RoomTimelineControllerAction { .none }
|
func processItemTap(_ itemID: TimelineItemIdentifier) async -> RoomTimelineControllerAction { .none }
|
||||||
|
|
||||||
func sendMessage(_ message: String, html: String?, inReplyTo itemID: TimelineItemIdentifier?) async { }
|
func sendMessage(_ message: String,
|
||||||
|
html: String?,
|
||||||
|
inReplyTo itemID: TimelineItemIdentifier?,
|
||||||
|
intentionalMentions: IntentionalMentions) async { }
|
||||||
|
|
||||||
func toggleReaction(_ reaction: String, to itemID: TimelineItemIdentifier) async { }
|
func toggleReaction(_ reaction: String, to itemID: TimelineItemIdentifier) async { }
|
||||||
|
|
||||||
func editMessage(_ newMessage: String, html: String?, original itemID: TimelineItemIdentifier) async { }
|
func editMessage(_ newMessage: String,
|
||||||
|
html: String?,
|
||||||
|
original itemID: TimelineItemIdentifier,
|
||||||
|
intentionalMentions: IntentionalMentions) async { }
|
||||||
|
|
||||||
func redact(_ itemID: TimelineItemIdentifier) async { }
|
func redact(_ itemID: TimelineItemIdentifier) async { }
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,10 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func sendMessage(_ message: String, html: String?, inReplyTo itemID: TimelineItemIdentifier?) async {
|
func sendMessage(_ message: String,
|
||||||
|
html: String?,
|
||||||
|
inReplyTo itemID: TimelineItemIdentifier?,
|
||||||
|
intentionalMentions: IntentionalMentions) async {
|
||||||
var inReplyTo: String?
|
var inReplyTo: String?
|
||||||
if itemID == nil {
|
if itemID == nil {
|
||||||
MXLog.info("Send message in \(roomID)")
|
MXLog.info("Send message in \(roomID)")
|
||||||
@@ -142,7 +145,10 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
switch await roomProxy.sendMessage(message, html: html, inReplyTo: inReplyTo) {
|
switch await roomProxy.sendMessage(message,
|
||||||
|
html: html,
|
||||||
|
inReplyTo: inReplyTo,
|
||||||
|
intentionalMentions: intentionalMentions) {
|
||||||
case .success:
|
case .success:
|
||||||
MXLog.info("Finished sending message")
|
MXLog.info("Finished sending message")
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
@@ -165,16 +171,22 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func editMessage(_ newMessage: String, html: String?, original itemID: TimelineItemIdentifier) async {
|
func editMessage(_ newMessage: String,
|
||||||
|
html: String?,
|
||||||
|
original itemID: TimelineItemIdentifier,
|
||||||
|
intentionalMentions: IntentionalMentions) async {
|
||||||
MXLog.info("Edit message in \(roomID)")
|
MXLog.info("Edit message in \(roomID)")
|
||||||
if let timelineItem = timelineItems.firstUsingStableID(itemID),
|
if let timelineItem = timelineItems.firstUsingStableID(itemID),
|
||||||
let item = timelineItem as? EventBasedTimelineItemProtocol,
|
let item = timelineItem as? EventBasedTimelineItemProtocol,
|
||||||
item.hasFailedToSend {
|
item.hasFailedToSend {
|
||||||
MXLog.info("Editing a failed echo, will cancel and resend it as a new message")
|
MXLog.info("Editing a failed echo, will cancel and resend it as a new message")
|
||||||
await cancelSend(itemID)
|
await cancelSend(itemID)
|
||||||
await sendMessage(newMessage, html: html)
|
await sendMessage(newMessage, html: html, intentionalMentions: intentionalMentions)
|
||||||
} else if let eventID = itemID.eventID {
|
} else if let eventID = itemID.eventID {
|
||||||
switch await roomProxy.editMessage(newMessage, html: html, original: eventID) {
|
switch await roomProxy.editMessage(newMessage,
|
||||||
|
html: html,
|
||||||
|
original: eventID,
|
||||||
|
intentionalMentions: intentionalMentions) {
|
||||||
case .success:
|
case .success:
|
||||||
MXLog.info("Finished editing message")
|
MXLog.info("Finished editing message")
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
|
|||||||
+15
-4
@@ -51,9 +51,15 @@ protocol RoomTimelineControllerProtocol {
|
|||||||
|
|
||||||
func sendReadReceipt(for itemID: TimelineItemIdentifier) async -> Result<Void, RoomTimelineControllerError>
|
func sendReadReceipt(for itemID: TimelineItemIdentifier) async -> Result<Void, RoomTimelineControllerError>
|
||||||
|
|
||||||
func sendMessage(_ message: String, html: String?, inReplyTo itemID: TimelineItemIdentifier?) async
|
func sendMessage(_ message: String,
|
||||||
|
html: String?,
|
||||||
|
inReplyTo itemID: TimelineItemIdentifier?,
|
||||||
|
intentionalMentions: IntentionalMentions) async
|
||||||
|
|
||||||
func editMessage(_ newMessage: String, html: String?, original itemID: TimelineItemIdentifier) async
|
func editMessage(_ newMessage: String,
|
||||||
|
html: String?,
|
||||||
|
original itemID: TimelineItemIdentifier,
|
||||||
|
intentionalMentions: IntentionalMentions) async
|
||||||
|
|
||||||
func toggleReaction(_ reaction: String, to itemID: TimelineItemIdentifier) async
|
func toggleReaction(_ reaction: String, to itemID: TimelineItemIdentifier) async
|
||||||
|
|
||||||
@@ -75,7 +81,12 @@ protocol RoomTimelineControllerProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension RoomTimelineControllerProtocol {
|
extension RoomTimelineControllerProtocol {
|
||||||
func sendMessage(_ message: String, html: String?) async {
|
func sendMessage(_ message: String,
|
||||||
await sendMessage(message, html: html, inReplyTo: nil)
|
html: String?,
|
||||||
|
intentionalMentions: IntentionalMentions) async {
|
||||||
|
await sendMessage(message,
|
||||||
|
html: html,
|
||||||
|
inReplyTo: nil,
|
||||||
|
intentionalMentions: intentionalMentions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,4 +160,25 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
|||||||
let attachment = wysiwygViewModel.textView.attributedText.attribute(.attachment, at: 0, effectiveRange: nil) as? PillTextAttachment
|
let attachment = wysiwygViewModel.textView.attributedText.attribute(.attachment, at: 0, effectiveRange: nil) as? PillTextAttachment
|
||||||
XCTAssertEqual(attachment?.pillData?.type, .allUsers)
|
XCTAssertEqual(attachment?.pillData?.type, .allUsers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testIntentionalMentions() async throws {
|
||||||
|
wysiwygViewModel.setHtmlContent(
|
||||||
|
"""
|
||||||
|
<p>Hello @room \
|
||||||
|
and especially hello to <a href=\"https://matrix.to/#/@test:matrix.org\">Test</a></p>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
let deferred = deferFulfillment(viewModel.actions) { action in
|
||||||
|
switch action {
|
||||||
|
case let .sendMessage(_, _, _, intentionalMentions):
|
||||||
|
return intentionalMentions == IntentionalMentions(userIDs: ["@test:matrix.org"], atRoom: true)
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
viewModel.context.send(viewAction: .sendMessage)
|
||||||
|
|
||||||
|
try await deferred.fulfill()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -45,7 +45,7 @@ packages:
|
|||||||
# Element/Matrix dependencies
|
# Element/Matrix dependencies
|
||||||
MatrixRustSDK:
|
MatrixRustSDK:
|
||||||
url: https://github.com/matrix-org/matrix-rust-components-swift
|
url: https://github.com/matrix-org/matrix-rust-components-swift
|
||||||
exactVersion: 1.1.23
|
exactVersion: 1.1.24
|
||||||
# path: ../matrix-rust-sdk
|
# path: ../matrix-rust-sdk
|
||||||
Compound:
|
Compound:
|
||||||
url: https://github.com/vector-im/compound-ios
|
url: https://github.com/vector-im/compound-ios
|
||||||
@@ -112,7 +112,7 @@ packages:
|
|||||||
minorVersion: 2.0.0
|
minorVersion: 2.0.0
|
||||||
WysiwygComposer:
|
WysiwygComposer:
|
||||||
url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift
|
url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift
|
||||||
exactVersion: 2.14.3
|
exactVersion: 2.14.4
|
||||||
# path: ../matrix-wysiwyg/platforms/ios/lib/WysiwygComposer
|
# path: ../matrix-wysiwyg/platforms/ios/lib/WysiwygComposer
|
||||||
SwiftOGG:
|
SwiftOGG:
|
||||||
url: https://github.com/vector-im/swift-ogg
|
url: https://github.com/vector-im/swift-ogg
|
||||||
|
|||||||
Reference in New Issue
Block a user