Commit Graph

183 Commits

Author SHA1 Message Date
Mauro Romito
155d153b36 use isDm from the SDK to determine if a room is a direct one to one room. 2026-05-06 13:04:11 +02:00
Mauro
11584d6bfe Live Location Sharing - handle server echoes (#5514)
* Track active live location sessions by ID instead of timeout.

# Conflicts:
#	ElementX/Sources/Services/Location/LiveLocationManager.swift

* implemented a system to promote starting session to active sesessions to send locations at the right time, and a system to remove a local session if it's handled by an external device.

* pr suggestions

---------

Co-authored-by: Doug <douglase@element.io>
2026-04-30 13:18:36 +00:00
Mauro
52d16618f6 Update SDK to 26.04.23 (#5478)
updated sdk, and added error management on the send LLS API
2026-04-24 13:07:16 +02:00
Mauro Romito
c9cafe0106 pr suggestions 2026-04-14 14:17:27 +02:00
Mauro Romito
074de88017 implement APIs for LLS observation 2026-04-14 14:17:27 +02:00
Mauro Romito
299649abbd pr suggestions 2026-04-03 12:36:45 +02:00
Mauro Romito
eabfdcd035 implement the start, send and stop functions 2026-04-03 12:36:45 +02:00
Stefan Ceriu
79e706e5d9 Hook up the RoomThreadList to the RoomFlowCoordinator state machine and presenting threads. 2026-04-01 14:09:23 +03:00
Stefan Ceriu
d27b6697a9 Introduce the RoomThreadListServiceProxy and expose it from the RoomProxy
Also update the sdk and app mocks and add a simple `RoomThreadListServiceProxyMock`

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj
#	ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	SDKMocks/Sources/Generated/SDKGeneratedMocks.swift
#	project.yml
2026-03-31 18:21:14 +03:00
Skye Elliot
293f99d5bc Add history sharing badges to room details (#5043)
* chore: Add dependency `SwiftFlow` for use in avatar header badges.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* feat: Display history sharing pill in room details.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* tests: Add tests for history sharing room details pill.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* tests: Update screenshots for RoomDetailsScreen preview tests.

* fix: Use Localazy translations for room details badges

* fix: Address review comments

* fix: Remove line limit from room details badges

---------

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-02-11 12:22:39 +00:00
Stefan Ceriu
04053ae69b Update files following swiftformat upgrade 2026-01-27 12:50:57 +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
Mauro Romito
cbf804cda6 pr suggestions and some code improvements 2025-10-03 10:55:27 +02:00
Mauro Romito
62cd5dbb9a implemented navigation for permalinks to threads
also this handles the case where we are permalinking to non existent (or impossible to fetch) event.
2025-10-03 10:55:27 +02:00
Mauro Romito
ff568f56fb removed identifier in the UIAction for opening a URL, also added a function to get a thread root from any event 2025-09-30 18:17:05 +02:00
Valere Fedronic
cb62112159 Listen to call decline to stop ringing when declined from other device (#4505)
* Listen to call decline to stop ringing when declined from other device

* use proper swift naming convention for Id/ID

* fix Force unwrapping

* fix lint

* An approach without the custom publisher.

* review: correct naming convention

* review: revert some invisible char/tab changes

* add ref to the room proxy in the closure

---------

Co-authored-by: Doug <douglase@element.io>
2025-09-18 16:11:03 +02:00
Valere Fedronic
dc1f174d40 Element Call: Send rtc.decline event when incoming call is declined (#4499) 2025-09-16 09:14:04 +01:00
Doug
c5d04e7c10 Fix some app route navigation bugs. (#4415)
- Opening a notification would update the stack with an animated pop.
- Opening a permalink from the timeline wouldn't push the room as a child.
2025-08-15 10:34:01 +01:00
Doug
b34a3dae59 Add a workaround to include some via parameters for room v12 tombstone links. (#4413)
Without them, following the link fails as previously the server could use the server name from the room ID (which in and of itself seems somewhat error prone).
2025-08-14 13:02:07 +01:00
Robin
37506cc4c1 Delegate the sending of call notifications to Element Call (#4370)
* Stop sending call notifications manually

The Element Call widget can now assume responsibility for sending them when you start a call.

* Bump Element Call embedded package to v0.14.0

* Delegate the sending of call notifications to Element Call

* Update the SDK.

* Use 'is' prefix for boolean

---------

Co-authored-by: Doug <douglase@element.io>
2025-08-01 18:47:48 +02:00
Stefan Ceriu
3726bcd012 Fix various new SDK breaking changes. 2025-07-24 14:55:34 +03:00
Doug
10bf553afd Use the timeline when marking a room as read (#4319)
* Forward JoinedRoomProxy.markAsRead to the timeline

The room version was building a fresh timeline even though we already had one.

* Run swiftformat 0.57.0.
2025-07-14 12:20:41 +01:00
Stefan Ceriu
e3f99d7aaf Make the RoomInfo isPrivate field optional and handle it accordingly. 2025-06-25 17:23:22 +03:00
Stefan Ceriu
7e30902ee1 Bump the SDK to v25.06.25; adopt the new optional RoomInfo joinRule and isPublic. 2025-06-25 17:23:22 +03:00
Stefan Ceriu
4b68d1caf3 Make the room power levels optional as they can be missing depending on what state events are requested 2025-06-25 17:23:22 +03:00
Stefan Ceriu
e5a49c568f Adopt room info power levels (#4245)
* Use the newly RoomInfo published PowerLevels; update permissions at the same time as the room info and avoid unnecessary async calls.

* Introduce a RoomInfoProxyProtocol and associated mock and move away from mocked SDK RoomInfos

* Bump the SDK to v25.06.23

* Expose new non-throwing methods for checking one's own user permissions

* Fix the unit and preview tests (except the TimelineMediaPreviewDetails for which simplified snapshots were generated)

* Converge on one single implementation for computing a room's avatar.

* Fix more unit tests

* Fix the TimelineMediaPreviewDetailsView snapshot tests

This reverts commit 9b6c819e611ad2fa3de2c34a4a7aa556fc9faadd.

---------

Co-authored-by: Doug <douglase@element.io>
2025-06-24 17:48:00 +01:00
Stefan Ceriu
60f4228162 Adopt the lastest SDK APIs and refactor how we deal with user permissions.
This patch introduces a new RoomPowerLevelsProxy and its associated mock and adopts newer Rust APIs to make working with user power levels and permissions easier.
2025-06-20 18:10:45 +03:00
Stefan Ceriu
1204edc772 Bump the SDK to v25.06.13 and add thread support to the ComposerDraftService 2025-06-13 16:56:13 +03:00
Mauro Romito
975d3c995a pr suggestions 2025-06-06 10:49:29 +02:00
Mauro Romito
d05108796f tombstoned and upgraded rooms implementation
added tests

tombstoned room avatar
2025-06-06 10:49:29 +02:00
Stefan Ceriu
d4e505854a Move the pinned timeline in line with the other timeline creation methods and have it report errors just like the others 2025-05-22 18:14:55 +03:00
Stefan Ceriu
57007f9eea Add mechanism for opening up a threaded timeline 2025-05-20 12:18:55 +03:00
Doug
57ce46e1bf Disable the composer when you don't have the power to post. (#4076) 2025-04-29 10:12:20 +01:00
Mauro Romito
58a3d0a7f3 feat: report a room
updated tests

updated tests

added a feature flag to report room

removed delay

rename
2025-04-07 17:17:08 +02:00
Mauro
302bc6c415 Add alerts with reason for kick and ban (#3967)
* feat: added alerts with reason for kick and ban

in the room members list screen

* fix tests
2025-04-01 16:06:40 +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
Mauro
431828828d Render Room and Message Pills (#3809)
* added a way to render the room and the message

pills, but is WIP

* permalinks now get converted into pills!

* fixed an issue where room address mentions

were not adding a URL properly but a string

* updated tests

* c

* Revert "c"

This reverts commit 5c80252fa23dba7e4d44f2a07fbf1e9500e37c82.

* updated tests

* more tests

* created APIs to get a specific RoomSummary

given the id or the alias

* small mention builder improvement

* pr suggestions
2025-02-25 13:46:01 +00:00
Mauro
bd930d6762 Added the banned room proxy (#3744)
* added the banned room proxy

and a way to have a consistent loading + a retry alert

* trailing closure

* indent a comment

* push package.resolved

* updated test case
2025-02-06 10:15:36 +01:00
Mauro
de8117ea93 Knocking feature polishing part 2 (#3738)
* improved implementation of the unknown state

* forget button in the banned state

* error handling for forbidden access

* added the forget function

fixed DMs, and updated preview tests

* removed banned room proxy

* code polishing and test improvement
2025-02-05 14:48:24 +01:00
Doug
bacaf5df8d Use the new preview screen when tapping media on the room and pinned events screens. (#3736)
* Use the new TimelineMediaPreview modifier on the room and pinned timeline screens.

* Use the same presentation logic for all timeline media previews.

* Fix a bug with the detection of the timeline end.

* Send pagination requests from the media preview screen.

* Add SwiftLint to the Danger workflow (it is no longer installed on the runner).

* Put SwiftLint back on all of the GitHub runners too.

* Set the function_parameter_count lint rule to 10.

* Make sure to clean-up any previews when the coordinator is done.

* Handle the viewInRoomTimeline action more appropriately.
2025-02-05 13:27:23 +00:00
Doug
4312a604c1 RoomTimeline… refactor (drop the Room). (#3728)
* Add the timeline controller factory to the timeline view model.

In preparation for building a timeline to swipe through media in QuickLook.

* Refactor RoomTimelineControllerFactory.

* Refactor RoomTimelineController.

* Refactor RoomTimelineProvider.
2025-02-03 14:14:01 +00:00
Mauro
998739308a DM Design Tweaks (#3693)
* dm design tweaks

* adding equatable conformance

* topic will now be shown in DMs

* code suggestion

* updated details

* better check

* code improvement
2025-01-22 13:32:39 +00:00
Stefan Ceriu
346b36e5ba Bump the RustSDK to v25.01.15 and fix (most) concurrency sendability warnings in the generated mocks. 2025-01-15 14:59:54 +02:00
Mauro
79332cb30a Security and privacy part 2 (#3637)
* handling the history visibility flag

* better logic to handle visibility

* better handling of the visibility options state

* added some copies, and the public room directory

visibility state

* completed the UI

added also the preview tests

* improved the handling of the directory visibility

* added the space users case

and improved handling of the access -> vsibility reaction. Also added a simple error handling for the public directory toggle

* added the edit room address view

but is missing its full implementation

* implement the UI for the edit room address screen

* implemented error checking

when editing the address

* updated preview tests and improved code

* typo fix

* Fix various issues after rebasing.

* Fix build errors and broken snapshot tests

* Adopt latest room privacy and canonical alias setting APIs

* Add support for creating and editing the room's alias.

* Add support for saving room privacy setting changes.

* Fix room alias screen snapshot tests following recent changes.

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2025-01-15 11:50:08 +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
Mauro
89ac38c91b Implement Knock Logic (#3573)
* WIP RequestToJoin struct

* implemented the logic to display the cells

* knock request banner accept flow

* mark all knocks as seen implemented

* details logic

* implemented accept, decline and ban in the list

* added a loader and modified the stacked view

of the banner

* pr suggestions

* updated naming and loading strings

* added the initial loading state

improved code and the tests

* updated a string that has changed

* code improvement

* tests for the room screen view model

* room details tests

and improved the knock requests tests for the room screen

* knock requests list tests

* added error state alerts with retry

* struct has been renamed on the sdk

so I renamed it also on the app side

* update SDK
2024-12-16 15:32:45 +01:00
Mauro
4e057fe195 Design Tweaks (#3606)
* updated the order of the room details

also...
- removed the bloom bg from the join room screen
- now DMs do not necessarily need to be encrypted rooms
- changed bg of the knock banner

* removed unnecessary disabled

* updated join room screen tests
2024-12-11 17:42:33 +00:00
Stefan Ceriu
e75c930d8f Media gallery - part 1(#3588)
* Introduce a `MediaEventsTimelineFlowCoordinator`
* Update SDK API and architecture
* Add a feature flag, add translations
* Move the media events timeline presentation under the room flow coordinator state machine
* Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState`
* Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
2024-12-06 16:58:14 +02:00
Mauro
1076588031 using roomPreview API for invited rooms (#3530)
* using roomPreview for invited rooms

* Update ElementX/Sources/Services/Room/RoomInfoProxy.swift

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

* improved code

* fix, but requires a SDK PR

* update sdk

* package resolved

* fixed the tests

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-11-19 19:23:06 +00:00
Mauro
019b4cdee8 Fix Rooms that user has knocked not displaying the request sent screen (#3513)
* fix knocked state

* pr suggestion

* code improvement
2024-11-14 13:43:40 +01:00