66 Commits

Author SHA1 Message Date
Doug
9b6324b295 Add boot detection in the NSE and use this to inform the user that there may be more notifications. (#5054)
* Add an initial implementation of the receivedWhileOfflineNotification.

* Only deliver a single receivedWhileOffline notification per boot and clarify the API.

* Add a 15-minute threshold for the receiveWhileOfflineNotification.
2026-02-06 15:18:09 +00:00
Mauro Romito
50c07b4a40 add NSE sources to EX project to easily implement mocking and allow the code to be unit tested 2025-11-19 13:20:14 +01:00
Mauro
dfa5214136 Threaded notifications (#4644)
* implemented grouping

* implemented presenting the thread

* improved the implementation by reusing the presentation action

* add Thread group to DMs to differentiate from non threaded messages of the same DM

* name for a threaded notification in group room

* focus event when tapping on a notification

* pr suggestions

* document
2025-10-23 15:28:45 +02:00
Mauro
6160c44d67 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
Doug
aabae58c9e Tidy up some logs that have a prefix. (#4443)
We haven't needed these for ages, Rust adds them to the log lines.
2025-08-26 16:21:10 +01:00
Stefan Ceriu
5a56abcfc7 Remove delivered notifications for rooms that have meantime become fully read and have messages newer than what's delivered
- this is a best effort solution to cleanup outdated notifications when using multiple clients and reading them elsewhere
2025-04-28 18:51:13 +03:00
Stefan Ceriu
d591c45988 Remove unused removeDeliveredInviteNotifications NotificationManager method 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
Mauro Romito
6c07af84cc sdk: update to 25.04.14 2025-04-14 14:15:42 +02:00
Doug
24a487ba82 Allow overriding the push gateway. (#3970) 2025-04-03 10:42:09 +01:00
Doug
6c51cc4b61 Log whether a notification is expected to make a noise. (#3782)
* Log whether a notification is expected to make a noise.

* Also log the system notification sound setting too.
2025-02-11 09:59:46 +00: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
Doug
acda16ddc3 Handle media source validation more gracefully. (#3571)
* Handle media source validation more gracefully.

* Fix unit tests.
2024-11-29 12:42:27 +00:00
Stefan Ceriu
6e79ad4a2e Enable inline replies for push notifications. 2024-11-20 18:42:36 +02: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
5874013c43 Only register for notifications when the setting is enabled. (#2819) 2024-05-08 16:10:35 +01:00
Stefan Ceriu
4b4c43ba06 Stop relying on the NotificationCenter for removing delivered push notifications:
- this will improve the architecture but more importantly will remove some very flakey unit tests
2024-04-12 19:18:00 +03:00
Stefan Ceriu
c6a4caf493 Attempt to improve unit test reliability:
- synchronize mock properties on the main queue
- sleep for longer when processing routes
- finish encoding before deallocating the keyed archiver
- wait for NotificationCenter notifications to be delivered
- change were we process remote notification permissions
2024-04-10 17:40:47 +03:00
Stefan Ceriu
6ec59fdc48 FIxes #2602 - Fix pushers not being registered on re-login after recent Onboarding changes 2024-04-02 13:26:03 +03:00
Stefan Ceriu
fd0eb78dbe Onboarding flow coordinator and FTUE changes (#2578)
Fixes #2595, fixes #2594, fixes #2593, fixes #2592, fixes #2591
2024-03-21 14:01:23 +02:00
Doug
63ff979057 Enable database encryption for new logins on Nightly/PR builds. (#2328)
- Slightly reworks where the pusher client ID is generated.
2024-01-12 16:45:59 +00:00
Mauro
bc97bdeea5 Removing dead code part 3 (#2264) 2023-12-19 12:12:16 +01:00
Mauro
a705d18ba6 Removing dead code part 2 (#2235)
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-12-15 20:16:16 +01:00
Mauro
84b0f967e8 Removing Dead Code part 1 (#2234) 2023-12-13 09:51:57 +01:00
Mauro
14d9fc52d4 Handle Room Routing using the membership state (#2154) 2023-11-22 17:37:26 +00:00
Mauro
3f8c246be2 Custom copy for notifications that contain mentions (#2050) 2023-11-09 18:12:11 +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
Mauro Romito
d484b39fd6 fix 2023-08-30 19:03:27 +02:00
Stefan Ceriu
65c7dec5c9 Adopt batched timeline diffs and other RustSDK changes 2023-08-02 12:08:57 +03:00
Alfonso Grillo
942c3eec33 Update SDK to 1.0.102-alpha (#1408)
* Update SDK to 1.0.102-alpha

* Log error

* Notification Improvements API part 1 (#1410)

* changes

* WIP

* progress

* updated test

* removed unused

* code improvement

* Process diffs as batches provided by the SDK.

---------

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
2023-07-27 09:48:56 +00:00
David Langley
d7d8f27d35 Remove Task.sleep from NotificationTests. (#1326)
- Add `weak` to mock variables called `delegate`
- Delete `UserNotificationCenterSpy` and use `UserNotificationCenterMock`
- Remove Task.sleep in favour of mock closures along with expectations/fulfillment.
2023-07-14 13:45:42 +01: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
66448921da Removing Delivered Notifications (#1305)
* completed

* changelog

* tests

* more tests

* better naming

* fix

* a bit more waiting time

* generated mocks

* xcodegen
2023-07-11 10:44:06 +02:00
Nicolas Mauri
e8c5e0625c New notifications section in settings (#1273) 2023-07-10 17:26:49 +00:00
Doug
e8ddaaa249 isDM in Notifications (#1254)
* isDm

* isDm added and some code improvements

* Bump SDK and fix one name.

* changelog

---------

Co-authored-by: Mauro Romito <mauro.romito@element.io>
2023-07-05 19:40:05 +02: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
Stefan Ceriu
abe1df2524 Removed unused swipe gesture (+3 squashed commits)
Squashed commits:
[d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier
[37c46ab9] Rename Analytics to AnalyticsService
[8852a371] #920 - Cleanup ServiceLocator usages
2023-06-28 11:33:41 +03:00
Mauro
ff8728b86c Placeholders added in push notifications (#1176)
* placeholders added in push notifications

* this code is a bit easier to read

* code improvement
2023-06-27 11:44:19 +00:00
Johannes Marbach
092e4db1a2 Render emote notifications like in the timeline (#1152)
Fixes: #1117
2023-06-26 16:33:46 +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
Stefan Ceriu
c239ed0f8c Bump the RustSDK to v1.0.79-alpha 2023-06-21 18:45:26 +02:00
Mauro
b14b78da3d Invitation Notification design improvements and navigation (#1091)
* invitation notification

* handling navigation to the invite view

* improved invite notifications

# Conflicts:
#	NSE/Sources/NotificationServiceExtension.swift

* improved the design

* improved the navigation handling on iPad vs iPhone

* comment

* code improvement

* better doc
2023-06-19 08:03:32 +00:00
Mauro
3e0e4d02cf SDK Bump to 1.0.73-alpha (#1043)
* sdk bump

* moved the bump event types to the sliding sync list builder

* removed sync growing mode from notifications even if we are not really using it anymore

* recency order is also for the all room list

* removed the local notification code entirely

* removed unused function

* fixed the code placement for the ordering
2023-06-07 15:22:54 +02:00
ElementRobot
c9ce18507a Translations update (#1013)
* Translations update

* fix for notification invite body

---------

Co-authored-by: Velin92 <Velin92@users.noreply.github.com>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2023-06-07 11:01:05 +00:00
Alfonso Grillo
199f5248af Create & Join rooms UI/UX tweaks (#1005)
* Fix people icon size

* Disable dismiss when loading in StartChatScreen

* Reduce debounce on search

* Add padding to invite button

* Add show/hide bottom bar behaviour

* Fix bg color in StartChatScreen form

* Update localisations

* Update search users results to 10

* Fix form background in InviteUsersScreen

* Fix invites list bg color

* Add mxid in InvitesScreenCell

* Refactor InvitesScreenCell design

* Fix separator spacing

* Add more design fixes

* Refine InvitesScreenCell layout

* Refactor UserProfileCell design

* Refactor FormRowAccessory

* Update localisations

* Fix camera size and security section padding

* Change create button style

* Refine InviteUsersScreenSelectedItem

* Refine CreateRoomScreen

* Refine UserProfileCell padding

* Amend preview name

* delete test code

* Add separator in security section

* Fix spacing in InviteUsersScreenSelectedItem

* Revert confirmationAction in CreateRoomScreen

* Refine HomeScreenInvitesButton

* Add dismiss keyboard in InviteUsersScreen

* Refactor FormRowAccessory

* Remove isDisabled from FormButtonStyles

* Update localisations

* Cleanup RoomDetailsEditScreen

* UI fixes on horizontal user carousel

* Refactor InviteUsersScreenSelectedItem

* Try fix flaky tests

* Fix typo

* Update snapshot tests

* Fix flaky UTs

* Fix HomeScreen ui tests

* Fix scroll on selection

* Refactor RoomFlowCoordinatorTests
2023-06-06 08:03:38 +00:00
Mauro
3885f234d0 Logging the failed device token registration (#969)
* logging the failed registration

* Update ElementX/Sources/Services/Notification/Manager/NotificationManager.swift

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

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-05-29 08:58:12 +00:00
Mauro
de4d065e60 Disable Local Push Notifications + Start Handling invite notifications (#882)
* disabled local pushes and fixed the issue with the image rendering

* disabled local notifications for now and started implementing invite notificatons

* disabled local notifications for now and started implementing invite notificatons

* removed code that should not have changed

* removed useless comment

* refactored name for category

* fixed a test

* fix

* fix for missing try await

* pr comments
2023-05-12 10:45:59 +00:00
Stefan Ceriu
842044ea1b Bump the SDK to 1.0.64-alpha 2023-05-11 14:07:09 +03:00
Mauro
733adbb7d6 Fix for the sender icon not being rendered in notifications sometimes (#862)
* fix for the sender icon not being rendered sometimes in notifications

* removing a line

* removing the environment every time we run a zsh command

* removed unused parameters that we already have stored in the notification

* changelog
2023-05-08 15:05:55 +00:00