1. Make some logs use `info` log level instead of `debug`, so they appear in most user's bug reports.
2. Make the anonymized tokens even harder to reverse.
3. Detect when the tokens we should be saving match the current ones, as that's an error.
* Move empty day separator filtering to a timeline post-processor
* Split `FilterPublicMembershipChangesPostProcessor` from `RoomBeginningPostProcessor`
* Use `runBlocking` for the token refresh logic
The `RustClientSessionDelegate` callbacks always run in a separate thread, so they don't block the main thread.
This ensures the token refresh is fully done (data saved/failed to) before the SDK continues sending the pending previously failed requests
* Fix message type prefixes formatting inconsistencies
* Use new string for the poll summary prefix instead of the A11y text. Also add tests check for the bold spans.
---------
Co-authored-by: Jorge Martín <jorgem@element.io>
* Filter some membership/profile/topic events in public rooms: don't display join and leave membership events in publicly joinable rooms, and hide display name and avatar url changes in non encrypted and publicly joinable rooms.
* Add empty day post-processing to the timeline based on bxdxnn's code, tweaked.
---------
Co-authored-by: Jorge Martín <jorgem@element.io>
* Update dependency org.matrix.rustcomponents:sdk-android to v26.05.20
* Fix API breaks:
- Handle new `ClientBuildException.InvalidRawKey` variant.
- `RoomInfo` now has a `fullyReadEventId` .
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
* Don't compress images sent through the Files attachment picker
Images and videos picked through the "Attachment" picker are now
uploaded without re-encoding, regardless of the "Optimize media quality"
setting. The gallery and camera pickers keep the existing behaviour,
matching what Element Web/Desktop and most other messengers do.
Fixes#6365
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Make sure we select the right video preset for sending as file
Wait for the video size estimations to be calculated before preprocessing the video file
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
This happens when building a `ShortcutInfoCompat` in `DefaultNotificationConversationService.onSendMessage` when the provided room name is not null but it's empty.
* Fix media viewer flickering
This was caused by the data being loaded triggering an index update that got out of sync with the displayed items, and for an instant, the pager index pointed to the wrong data until it was refreshed
* Reuse the same 'displayer' function for both forwards and backwards pagination
* Make `dataFlow` a property so we don't create a new instance every time we access it
* Remove `pageDataComparator` as it prevented new items from being loaded when a pagination returned no valid items to display but has more items to load
Make sure we modify the current index when loading new data only if it was pointing to the input event id.
* Fix `MediaViewerDataSource` overriding the provided timestamp for `Loading` items
Test emitting different loading items from the data source results in the state displaying the different items, so they will trigger a new pagination attempt
* Add regression test to check loading -> error -> loading states will still trigger 2 separate `LoadMore` events
* Fix Maestro: tap on confirmation for inviting unknown users to a room
* Tap on back after inviting some user
* Tap on back again
* Confirm inviting someone to a DM
* Make fix conditional
`AnalyticsLongRunningTransaction.PushToWorkManager` was incorrectly used instead of `AnalyticsLongRunningTransaction.PushToNotification`, resulting in wrongly formatter analytic traces
* Improve `FetchPushForegroundService`'s reliability
- Don't use DI, we can just create the notification channel. This should speed up the creation of the service and reduce the number of `ForegroundServiceDidNotStartInTimeException` received. Also use `MainScope` instead of the app's coroutine scope.
- Move the wakelock releasing mechanism to `onDestroy` so it's always used. Previously, this would only happen when `stopService` was called, which would only happen when `stopSelf()` is called, but not when the OS or the service manager stops the service.
* Add fallback value for the notification channel title
* Replace the wrong string for the notification/channel title
---------
Co-authored-by: Benoit Marty <benoitm@element.io>
* Set `DmRoomDefinition.TwoPeople` in `ClientBuilder`. This applies the 'direct and with at most 2 non-service members' rule to what the SDK should consider a DM.
* Map `RoomInfo.isDm` from the SDK
* Map `NotificationData.isDm` from `NotificationInfo.roomInfo.isDm`
* Remove `RoomIsDmCheck` file as its extension functions are now redundant. Move `Room.isDm` helper function to `BaseRoom`.
* Map `isDm` in `SpaceRoom` from the SDK too
* Replace `isDirect` with `isDm` where possible
* Map `RoomMember.isServiceMember` from the SDK and use it to tell apart normal members of a room from service members (i.e. `RoomMembersState.getDirectRoomMember`)