-
Notifications
You must be signed in to change notification settings - Fork 842
Description
My homeserver uses Dimension as integration manager. So RiotX fetches https://<dimension>/riot
as integrtionUIUrl
and https://<dimension>/api/v1/scalar
as integrationRestUrl
via Integration manager discovery MSC1957.
If the terms of service are not signed, the URL https://<dimension>/api/v1/scalar
gets passed as baseUrl
to
https://github.com/vector-im/riotX-android/blob/e878821df2fdad04279a1f1d9b6c012095b674cf/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/terms/DefaultTermsService.kt#L103
This method adds /_matrix/integrations/v1/
to the URL which ends up in a request to https://<dimension>/api/v1/scalar/_matrix/integrations/v1/terms
instead of https://<dimension>/_matrix/integrations/v1/terms
to review the terms.
In my understanding of MSC2140 the path /_matrix/integrations/v1
is meant to be absolute. Thus the path in baseUrl
should be dropped before appending this path. I think this could be done in the method linked above or at
https://github.com/vector-im/riotX-android/blob/e878821df2fdad04279a1f1d9b6c012095b674cf/vector/src/main/java/im/vector/riotx/features/widgets/WidgetViewModel.kt#L239