Commit Graph

5747 Commits

Author SHA1 Message Date
Benoit Marty c0848cee9d Add KDoc to the libraries/deeplink API interfaces
Document DeeplinkParser, DeepLinkCreator and InviteFriendsUseCase, including that
DeepLinkCreator.create silently ignores the deeper arguments once an outer one is
null.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:28:47 +02:00
Benoit Marty 0a47aefdf7 Add KDoc to the libraries/permissions API interfaces
Document PermissionsStore, PermissionStateProvider, LocalNetworkPermissionAdvisor
and the PermissionsPresenter factory, along with their members and parameters.

The store doc explains why the module exists: Android does not let an app
distinguish "never asked" from "asked and denied", so the app has to remember
that itself in order to decide whether it may show a rationale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:57:38 +02:00
Benoit Marty a90801bcec Add KDoc to the libraries/pushstore API interfaces
Document UserPushStore, UserPushStoreFactory, PushClientSecret,
PushClientSecretStore and PushClientSecretFactory along with all their members.

The client secret interfaces now explain why they exist at all: a push gateway
delivers notifications without saying which account they belong to, so the secret
is what lets an incoming push be attributed back to a session.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:56:28 +02:00
Benoit Marty c6af196bf0 Add KDoc to the libraries/wellknown API interfaces
Document WellknownRetriever, ElementWellknownStore, ElementWellKnownParser and
their factories, along with every member.

The caching semantics are the part callers need and cannot see in the signatures,
so they are recorded here: the store reports entries older than a day as outdated
rather than missing, the retriever returns such a value immediately and refreshes
in the background, an enterprise build with a hardcoded configuration
short-circuits entirely, and the parser ignores unknown JSON fields.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:50:08 +02:00
Benoit Marty 23a346907c Add KDoc to the libraries/mediaupload API interfaces
Document MediaSender and all its members, its two factories, MediaPreProcessor,
MaxUploadSizeProvider and MediaOptimizationConfigProvider.

The MediaSender doc explains the two-step shape of the API, which the individual
signatures do not convey: pre-processing and sending are separate so a preview
can be shown in between, and the temporary files that pre-processing creates are
only released by cleanUp, whether or not anything was ultimately sent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:44:42 +02:00
Benoit Marty 414d2b5dd0 Add KDoc to the libraries/emoji API interfaces
Document AddRecentEmoji, GetRecentEmojis.invoke, the EmojiPickerRenderer
interface and the EmojiPickerPresenter factory, pointing at the no-op renderer
and the empty recent-emoji source so callers know how to opt out of each.

EmojiPickerPresenter itself is a Presenter and therefore out of scope.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:39:36 +02:00
Benoit Marty 82ff94672b Add KDoc to the libraries/preferences API interfaces
Document AppPreferencesStore, SessionPreferencesStore, their two factories, and
each of their 44 members.

For a preference store the useful thing to document is the fallback value, so
each getter states the default it uses when the preference has never been set,
taken from DefaultAppPreferencesStore and DefaultSessionPreferencesStore:
developer mode follows the build type, live location updates default to 10
metres, the log packs to an empty set, and the session toggles are all on by
default except session verification skipping.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:35:57 +02:00
Benoit Marty f01abdc00d Add KDoc to the libraries/push API interfaces
Document PushService, GetCurrentPushProvider, NotificationCleaner and
NotificationBitmapLoader along with their members, and add the missing @param
entries across the notification interfaces.

The NotificationCleaner docs record the behaviour shared by all its methods,
which is not visible in the signatures: each one also removes the grouping
summary notification once it has no children left.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:33:16 +02:00
Benoit Marty 69e466a8e1 Add KDoc to the remaining matrix API interfaces
Document the permalink, widget, tracing, core, platform, server and analytics
interfaces along with their members, which completes libraries/matrix/api: all
69 in-scope interfaces and their 398 members now carry documentation.

Notable points recorded here: PermalinkParser reports an unrecognised uri as a
fallback link rather than failing, MatrixWidgetDriver.run is a no-op while it is
already running and send is silently ignored once closed, and every member of
CallAnalyticCredentialsProvider is null when the service is unconfigured or the
user has not consented to analytics.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:27:01 +02:00
Benoit Marty 99bbd0e29e Add KDoc to matrix API notification and pusher interfaces
Document NotificationSettingsService and PushersService along with all their
members, and complete the NotificationService documentation.

Fix the documentation of notificationSettingsChangeFlow, which described a state
flow of room notification settings when the member is a SharedFlow<Unit> that
only signals that the push rules changed. That was the sole reference to
RoomNotificationSettingsState in the file, so its now unused import is removed.

The docs also explain why so many of these methods take isEncrypted and
isOneToOne: Matrix keeps a separate default push rule per combination.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 09:16:53 +02:00
Benoit Marty 68e5ea5a74 Add KDoc to matrix API media, mxc and scanner interfaces
Add the interface level docs that MediaPreviewService, MatrixMediaLoader and
MxcTools were missing, document MediaFile.path and the nested
ContentScannerUrlProvider.Factory, and add the missing @param entries.

Most members in these packages already had accurate documentation and are left
untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 19:30:24 +02:00
Benoit Marty 1e19f5b607 Add KDoc to matrix API room list, directory and spaces interfaces
Document RoomDirectoryService, RoomDirectoryList, SpaceService, SpaceRoomList
and LeaveSpaceHandle along with their members, add the missing DynamicRoomList
page size doc and the missing @param entries, and give MessageSearchService the
interface level doc it was lacking.

The docs make the ownership rules explicit, since they differ across these
types: a SpaceRoomList and a LeaveSpaceHandle are owned by the caller and must be
destroyed or closed, while a RoomDirectoryList and a MessageSearch are released
when the scope they were created with completes.

RoomList, RoomListService and the search interfaces were already accurate and are
left untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 19:28:15 +02:00
Benoit Marty 0b2d6eafc3 Add KDoc to matrix API authentication and device linking interfaces
Document MatrixAuthenticationService, OAuthRedirectUrlProvider, the two QR code
login data interfaces, and the four device linking interfaces, along with their
members and parameters.

The docs record the ordering constraints a caller has to respect: setHomeserver
must precede any login attempt, the link handlers report their outcome through
their step flow rather than through a return value, and ContinuationMessageSender
expects exactly one of cancel or confirm.

The oauth package holds only a sealed interface, so it is out of scope here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 19:14:00 +02:00
Benoit Marty fa01166197 Add KDoc to matrix API encryption and verification interfaces
Document EncryptionService, SessionVerificationService and
SessionVerificationServiceListener along with their members, and add the missing
@param entries.

From RustEncryptionService: the backup and recovery state flows report a
waiting-for-sync value for as long as the session is not syncing, and
isLastDevice and hasDevicesToVerifyAgainst are polled rather than observed.
PasswordStrengthEstimator was already accurate and is left untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 19:10:58 +02:00
Benoit Marty 54780f0f70 Add KDoc to matrix API timeline interfaces
Document Timeline and all of its members, TimelineProvider, and the three
lazy providers carried by EventTimelineItem.

Behaviours taken from RustTimeline: collecting membershipChangeEventReceived or
onSyncedEventReceived is what keeps the timeline subscribed to the SDK, paginate
fails with CannotPaginate when the matching status forbids it, the initial
hasMoreToLoad of each pagination status depends on the timeline mode,
timelineItems also carries virtual items such as date separators, and the media
send functions return a handler the caller must await.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 19:07:55 +02:00
Benoit Marty 8a88638667 Add KDoc to matrix API knock, threads and permissions interfaces
Document KnockRequest and ThreadsListService along with all their members, and
add the missing @param entries to the already documented RoomPermissions.

For ThreadsListService the docs record what the implementation does with the
subscriptions: subscribeToItemUpdates starts a shared subscription on the first
call and re-emits the whole list, subscribeToPaginationUpdates replays the
current state immediately, and destroy leaves the service unusable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 19:03:48 +02:00
Benoit Marty 0bd4dc39cd Add KDoc to matrix API room interfaces
Document BaseRoom, JoinedRoom, NotJoinedRoom, RoomAliasHelper and JoinRoom,
along with their members, and add the missing @param entries.

Fix the documentation of BaseRoom.getUpdatedIsEncrypted, which described the
room directory visibility instead of the encryption state it actually returns.

Behaviours taken from the implementations: BaseRoom.predecessorRoom swallows
errors into null, updateMembers only reads the cache on its first call,
JoinedRoom.syncUpdateFlow is an opaque change counter, notification settings
start in an Unknown state until updateRoomNotificationSettings is called, and
JoinRoom maps a Forbidden answer to Failures.UnauthorizedJoin.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 19:02:12 +02:00
Benoit Marty 5d6384e175 Add KDoc to MatrixClient
Document the interface itself and all of its 60+ properties and functions.

Notable behaviours taken from RustMatrixClient that callers cannot guess from
the signatures: getRoom and getJoinedRoom build a new closeable instance on
every call, createRoom/joinRoom/knockRoom wait for the membership to come back
through sync and report a null RoomInfo rather than a failure when that wait
times out, getCacheSize excludes the crypto database, and clearCache destroys
the client while keeping the session.

Also fix the stale wording and the malformed KDoc block on resolveRoomAlias,
and add the missing @param entries on the functions that already had a summary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:49:45 +02:00
Benoit Marty 42d3893755 Add KDoc to matrix API session and sync interfaces
Document MatrixClientProvider, SdkMetadata, HomeserverCapabilitiesProvider,
TemporaryMatrixClientFactory and SyncService, along with each of their members.

Behaviour described here was checked against the implementations
(MatrixSessionCache, RustSdkMetadata, RustHomeserverCapabilitiesProvider,
RustTemporaryMatrixClientFactory and RustSyncService), so the docs mention the
caching, idempotence and error-wrapping that callers cannot infer from the
signatures alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:34:30 +02:00
Jorge Martín 913b566270 Add missing tests for RustTemporaryMatrixClient 2026-08-13 12:46:46 +02:00
Jorge Martín 07e90ff704 Fix MarkdownTextInputTest using the previous onSendMessage signature 2026-08-13 12:10:19 +02:00
Benoit Marty d017a84b2b Remove useless let statement. 2026-08-13 11:47:22 +02:00
Benoit Marty 76d547e988 Merge pull request #7347 from hayaksi1/fix/2614-linkify-ipv6-urls
Linkify URLs whose host is a bracketed IPv6 address
2026-08-13 09:49:40 +02:00
Benoit Marty 8c8d232eac Make onSendMessage parameter not nullable 2026-08-13 09:21:31 +02:00
Benoit Marty fb82291f0a Merge pull request #7353 from hayaksi1/fix/860-enter-sends-message
Send a message with Enter on a physical keyboard, Shift+Enter for a new line
2026-08-13 09:19:07 +02:00
Benoit Marty 2aea4782e3 Merge pull request #7370 from hayaksi1/fix/6253-duplicate-notification-messages
Stop repeating messages that are already shown in a room notification
2026-08-13 09:13:15 +02:00
Benoit Marty 530de1f85d Merge pull request #7345 from hayaksi1/fix/6426-unifiedpush-account-name
Show the account a UnifiedPush registration belongs to in the distributor
2026-08-13 09:09:57 +02:00
Benoit Marty ae5c4161c7 Remove redundant parenthesis 2026-08-12 18:14:36 +02:00
Benoit Marty 00e9a8ab71 Fix wrong TextComposer placeholder displayed when in a thread.
We cannot only use MessageComposerMode since use can edit a message in a thread, so this is becoming handly.
2026-08-12 17:05:08 +02:00
Benoit Marty 3029218dde Merge branch 'develop' into fix/2614-linkify-ipv6-urls 2026-08-12 13:48:36 +02:00
Benoit Marty 7b0745c5f1 Fix layout issues. 2026-08-12 11:00:55 +02:00
Benoit Marty 7d99bf0d52 Merge branch 'develop' into matthew/knock-push-notifications-pr 2026-08-11 17:21:34 +02:00
Benoit Marty b2269a9f64 Merge pull request #7351 from hayaksi1/fix/4191-video-bitrate-clamp
Never re-encode a video at a higher bitrate than the source
2026-08-11 17:18:50 +02:00
Benoit Marty 6a124c59ac Merge pull request #7348 from hayaksi1/fix/3338-rtl-room-list-preview
Stop a right to left sender name from reordering a room list preview
2026-08-11 16:25:59 +02:00
Benoit Marty 433f5d1d04 Merge pull request #7350 from hayaksi1/fix/5766-redaction-unknown-target
Do not notify about a redaction whose target event is unknown
2026-08-11 16:21:28 +02:00
Benoit Marty 2e7f3f1371 Merge pull request #7346 from hayaksi1/fix/5780-voice-recorder-double-start
Ignore a second voice recording start while one is already running
2026-08-11 16:20:20 +02:00
Benoit Marty fbe2b3574f Merge pull request #7363 from hayaksi1/fix/2419-empty-waveform-seek
Let a voice message without a waveform be seeked
2026-08-11 16:00:59 +02:00
Benoit Marty 0eb73af1fd Merge pull request #7365 from hayaksi1/fix/7046-voice-message-screen-timeout
Keep playing a voice message when the screen turns off
2026-08-11 16:00:23 +02:00
Benoit Marty 12f4330724 Merge pull request #7371 from hayaksi1/fix/5428-send-to-room-subtitle
Show the alias or the direct message user's Matrix ID in the room picker
2026-08-11 15:59:29 +02:00
Benoit Marty 44caa94f3d Merge pull request #7373 from hayaksi1/fix/5794-account-data-api
Expose global account data get and set on MatrixClient
2026-08-11 14:51:57 +02:00
Benoit Marty f7508cb29a Merge pull request #7356 from hayaksi1/fix/4008-fediverse-handle-not-email
Do not linkify the server part of a fediverse handle as an email address
2026-08-11 14:48:40 +02:00
Benoit Marty ad39144a99 Merge pull request #7362 from hayaksi1/fix/4973-media-gallery-error
Keep the opened image on screen when the media gallery fails to load
2026-08-11 14:15:01 +02:00
Benoit Marty e2a1342efa Merge pull request #7360 from hayaksi1/fix/7253-skip-other-account-notifications
Do not notify about an event sent by another account on the same device
2026-08-11 14:14:36 +02:00
Benoit Marty 4ac913e7c0 Merge pull request #7366 from hayaksi1/fix/3493-media-progress-insets
Do not draw the media loading progress bar under the status bar
2026-08-11 14:05:05 +02:00
Benoit Marty 90a2a258d1 Merge branch 'develop' into fix/5794-account-data-api 2026-08-11 14:03:39 +02:00
Jorge Martín 6c7f4d3b24 Add some missing tests to improve coverage 2026-08-11 13:18:49 +02:00
Jorge Martín e371b46c68 Rename GetUrlResolver to UrlContentFetcher and TemporaryMatrixClientFactory.createTemporaryMatrixClient to just create 2026-08-11 13:18:49 +02:00
Jorge Martín dbc28df3eb Remove unnecessary call to fetchElementWellKnown when the value was up to date in the store in DefaultWellknownRetriever 2026-08-11 13:18:49 +02:00
Jorge Martín e92016c68e Improve host extraction in DefaultWellknownRetriever 2026-08-11 13:18:49 +02:00
Jorge Martín e24468c74f Fix and add tests 2026-08-11 13:18:49 +02:00