Commit Graph

64 Commits

Author SHA1 Message Date
Stefan Ceriu
3dd98adeeb Setup the new RustSDK sentry integration 2025-05-27 18:21:11 +03:00
Stefan Ceriu
4c7791ab24 Fix various small errors when running in the Swift 6 language mode (#4109)
* Fix various small errors when running in the Swift 6 language mode

* Make the `TargetConfiguration` run on the main actor.

* Fixed a comment

* Add a comment as to why we can't make the whole NSE a main actor.

* Fix the unit tests

* Fix `blankLinesAtStartOfScope` swiftformat error.
2025-05-13 11:43:47 +03:00
Stefan Ceriu
f24e81ae9f Rely on the room's info to decide whether a call ringing notification is outdated and should be ignored as opposed to a time based approach. 2025-04-29 19:45:55 +03:00
Stefan Ceriu
cd983a9d45 Introduce a NotificationHandler object to split out notification content handling from the rest of the NSE core logic. 2025-04-17 15:24:12 +03:00
Stefan Ceriu
b9092bc3a6 Remove unused NSE Task extension 2025-04-17 15:24:12 +03:00
Stefan Ceriu
77bb613e62 Switch from an always returning the notification content approach at every step to passing it in as mutable. 2025-04-17 15:24:12 +03:00
Stefan Ceriu
558a77525b Refactor the NSE so that the original notification content is preserved between all the different processing steps
- building brand new content is probably interfering with how iOS syncs up delivered and seen notifications between devices
- simplify all the various steps and make the flows easier to follow
2025-04-17 15:24:12 +03:00
Stefan Ceriu
0c8b3470e1 Refactor the NSE to create a new UserSession every time a payload comes in and pass the room down to the SDK so it can optimize how many rooms it loads from the store and how much memory it's using.
- this will undo creating at most one user session pe process as that shoulnd't be a problem anymore
- it also renames some methods and improves the logging
2025-04-03 18:08:34 +03:00
Stefan Ceriu
346e4adde3 Remove the event cache feature flag, it's enabled by default on the SDK and we haven't had any bug reports for it. 2025-04-03 18:08:34 +03:00
Doug
0badcd1303 Add developer options for Rust's Trace Log Packs. (#3929)
* Add support for configuring log packs.

* Update call widget parameters.

* Update the SDK.
2025-03-21 19:00:13 +00:00
Stefan Ceriu
1ae6fc67c4 SDK update (#3891)
* Bump the RustSDK to v25.03.11

* Replace oidc login prompt with nil following the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/4761

```
/// * `prompt` - The desired user experience in the web UI. No value means
///   that the user wishes to login into an existing account, and a value of
///   `Create` means that the user wishes to register a new account.
```

* Fix trailing closure warnings

* Update the client proxy after making `getNotificationSettings()` and  `cachedAvatarUrl()` async (they used to be blocking on the rust side).

* Move `Room.isEncrypted` to the info publisher and manually update the encryption state when creating the room.

* Bump the SDK again to v25.03.12 - This introduces a new way to configure the tokio runtime that we can use to have extensions use less memory
- introduce a new Target struct that takes care of setting up rust services (tracing and tokio) for our various targets
- cleanup MXLog and friends

* Address PR comments

* Bump the SDK again, switch back to using `.consent` as the OIDC login prompt (which was reintroduced in matrix-org/matrix-rust-sdk/pull/4791)
2025-03-13 11:17:37 +02:00
Doug
97a4f4fcfe Add a couple of extra logs around the state of call ringing notifications. (#3808) 2025-02-24 10:07:33 +00:00
Stefan Ceriu
6f3b4feade Refactor how notifications are preprocessed and be explicit about which ones are supposed to be displayed or discarded. 2025-02-10 12:28:17 +02:00
manuroe
c29f4cc9b4 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
a297643443 Bump the RustSDK to v1.0.79; add a feature flag for the new rust side ClientBuilder::useEventCachePersistentStorage 2024-12-10 18:19:31 +02:00
Stefan Ceriu
7aaeb0053e Bump the RustSDK to v1.0.67 (#3512)
* Bump the RustSDK to v1.0.67

* PR comments

---------

Co-authored-by: Doug <douglase@element.io>
2024-11-13 18:03:30 +00:00
Stefan Ceriu
07cf873484 Share extension (#3506)
* Setup simple share extension

* Switch the app url scheme to be the full bundle identifier

* Setup a share extension that show a SwiftUI view, uses rust tracing and redirects to the hosting aplication

* Move media as json through the custom scheme into the main app and deep link into the media upload preview screen

* Fix message forwarding and global search screen room summary provider filtering.

* Tweak the message forwarding and global search screen designs.

* Add a room selection screen to use after receiving a share request from the share extension

* Fix share extension entitlements

* Share the temporary directory between the main app and the extensions; rename the caches one.

* Remove the no longer needed notification avatar flipping fix.

* Extract the placeholder avatar image generator from the NSE

* Nest `AvatarSize` within the new `Avatars` enum

* Donate an `INSendMessageIntent` to the system every time we send a message so they appear as share suggestions

* Support suggestions in the share extension itself

* Improve sharing animations and fix presentation when room already on the stack

* Clear all routes when sharing without a preselected room.

* Fix broken unit tests

* Various initial tweaks following code review.

* Correctly clean up and dismiss the share extension for all paths.

* Move the share extension path to a constants enum

* Rename UserSessionFlowCoordinator specific share extension states and events

* Add UserSession and Room flow coordinator share route tests

* Tweak the share extension logic.
2024-11-13 14:02:47 +02:00
Doug
74ff86695e Add developer option to hide media in the timeline. (#3366) 2024-10-03 17:59:39 +01:00
Valere
a9fddb5dbb crypto: Add configuration flag to enable invisible crypto (#3247) 2024-09-18 16:30:45 +01:00
Doug
a028f790b5 Make sure we don't reuse an old NSEUserSession after logging out and back in. (#3273) 2024-09-12 10:24:05 +01:00
Stefan Ceriu
89eae00479 Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Doug
ef2fd1e0d2 Adopt sliding sync versions for client Restoration. 2024-08-30 14:45:54 +03:00
Doug
039cc1621f Remove delivered notifications if their event gets redacted. (#3191) 2024-08-22 13:49:00 +01:00
Mauro
28bfa3f5dc Pinned items timeline implementation for the banner (#3099) 2024-08-05 14:09:05 +02:00
Doug
a141532355 Add a feature flag for Simplified Sliding Sync. (#3057)
* Disable SSS when logging out.

* Bump the SDK.
2024-07-18 10:16:51 +01:00
Doug
de07f441f0 Add a ClientBuilder hook. (#3056) 2024-07-18 09:47:37 +01:00
Stefan Ceriu
807175169d Synchronize access to the new NSE user session property 2024-06-19 19:49:41 +03:00
Stefan Ceriu
2fcd7c320f Avoid creating multiple clients if the NSE is invoked more than once on the same process 2024-06-19 19:49:41 +03:00
Stefan Ceriu
7b12e95192 Show ElementCalls in the system Recents list and allow deep linking back into a call from there 2024-05-27 17:04:48 +03:00
Stefan Ceriu
70bf5d0e8d Add support for showing the native OS incoming call screen when starting new Element Calls 2024-05-24 15:32:56 +03:00
Stefan Ceriu
1709b48b09 Print out the current process identifier on NSE runs 2024-04-15 16:23:59 +03:00
Stefan Ceriu
bfe74d68d4 Avoid potential app side NSE UserSession races and let the SDK handle them instead 2024-04-15 15:27:08 +03:00
Stefan Ceriu
8be236883d Adop the new SDK permalink detector and user builder 2024-04-12 18:04:41 +03:00
Stefan Ceriu
b4f653d6d8 element-hq/element-x-ios/issues/2670 - Show invites as part of the room list 2024-04-09 18:18:11 +03:00
Stefan Ceriu
c438cde085 Use the unread count to update the application badge on all flow branches 2023-11-13 13:44:39 +02:00
Mauro
3f8c246be2 Custom copy for notifications that contain mentions (#2050) 2023-11-09 18:12:11 +00:00
Doug
19947b7177 Use the custom log level inside the NSE too. (#2020) 2023-11-04 08:36:49 +00:00
Mauro
f4d164b2e7 Fix NSE Leak (#2022) 2023-11-03 20:30:58 +00:00
Mauro
981a51e61b Fixed a bug that prevented the mentions to be shown as plain text in the room list cell (#1835)
* fix a bug that made the room list not render mentions as plain text

* better naming
2023-09-29 14:49:20 +00:00
Mauro
4c5e6cfd19 Pill View (#1797)
* provider can now check the current session

* More testable code

* created the test condition

* it works but not always not sure why, need to dig deeper

* sadly we need to use textkit 1 to solve this issue

* removed developer option screen test

* this experimental solution kinda works but I need a way to pill recomputation is weird

* format

* display improvement

* better and faster solution

* pilished the code

* better coloring

* swift format

* just need to solve the caching issue

* fix caching issue

* tests done!

* changelog

* pr comments addressed

* all pr comments addressed

* docs

* line lenght

* updated tests and fixed a parsing permalink issue

* MentionBuilder

* pr comments

* swiftformat

* code blocks should not have links

* Update ElementX/Sources/FlowCoordinators/RoomFlowCoordinator.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update ElementX/Sources/Services/Client/ClientProxy.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update UnitTests/Sources/AttributedStringBuilderTests.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update ElementX/Sources/UITests/UITestsAppCoordinator.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update ElementX/Sources/Other/Pills/PillAttachmentViewProvider.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update ElementX/Sources/Other/Pills/MentionBuilder.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* pr comments

* swiftformat

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-09-27 17:27:07 +00:00
Doug
7cbb064464 Enable OIDC token refresh in the NSE. (#1711)
Update the SDK and handle API changes.
2023-09-15 09:01:09 +00:00
Stefan Ceriu
4646153818 Parse markdown and html from push notifications (#1688)
* Extract notification content building outside of the NotificationItemProxy. First step in a bigger refactoring of the NSE

* Import the attributed string buider into the NSE, sort `sources` imports

* Extract message event string building into the RoomMessageEventStringBuilder and reuse it building content for push notifications

* Cleanup

* Add changelog
2023-09-13 12:30:41 +03:00
Stefan Ceriu
9c3242932c Update the app badge after receiving a notification by reading and using the unreadCount from the request payload 2023-09-06 16:41:59 +03:00
Doug
98bfb2ead4 Enable OIDC support (#1541)
Notification content is bypassed for now.
2023-08-22 15:53:27 +01:00
Mauro Romito
947ff6e35d removed filter by push rules ff 2023-08-17 11:37:25 +02:00
Mauro
ec92cfeecb FF to enable filtering notifications by push rules (#1412)
* filtering notification by push rules

* changelog

* Apply suggestions from code review

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-27 14:12:52 +00:00
Mauro Romito
5f50847ce1 two sync loop always enabled by default 2023-07-26 10:39:19 +02:00
Mauro
a3671e9685 SDK Changes Refactor (#1312)
* internal id

* notification refactor

* client proxy refactor

* required self

* better identifier system

* using the event id when required

* tests fixed

* tested some stuff

* fixed merge conflict

* improved the test wait

* animation disabled

* Bump Rust SDK version to 1.0.98-alpha (#1310)

* code improvement

* pause sync

* pr suggestions

* result

* Apply suggestions from code review

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* enum based debug identifier

---------

Co-authored-by: aringenbach <80891108+aringenbach@users.noreply.github.com>
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-12 10:28:41 +00:00
Mauro
2221dfc79a Notification Placeholder Image Caching (#1248)
* placeholder image caching

* code improvement

* code is now clearer
2023-07-05 12:28:45 +00:00
Mauro
dba4060423 Two sync loop experimental solution to decrypt push notifications (#1082)
* Experimental two sync loop solution

* better logging

* improved the code and handled invite notifications display better

* improved invite notifications

* new exerimental branch

* new sync loop

* code updated

* code improvements

* code improvements

* fix typo

* code improvements

* removed some unused code and added a respawn

* fixing some NSE issues

* code improvements

* new version of the branch

* more logging

* running the nse process ONLY IF necessary

* finally works! made also the feature flag

* also the encryption value of the room list api will depend on the flag now

* changelog

* code improvements

* code improvement

* updated proj

* fixing some compilation error after the rebase

* opt-in for the encryption sync

* fix
2023-06-22 17:23:33 +00:00