Legals#4660
Conversation
| @Suppress("UNCHECKED_CAST") | ||
| ((throwable.toRegistrationFlowResponse() | ||
| ?.params?.get(LoginFlowTypes.TERMS) as? JsonDict) | ||
| ?.get("policies") as? JsonDict) |
There was a problem hiding this comment.
A bit dirty but it works...
|
@bmarty I think we can use this icon for it. |
| private suspend fun getHomeserverTerms(baseUrl: String): GetTermsResponse { | ||
| return try { | ||
| executeRequest(null) { | ||
| termsAPI.register(baseUrl + NetworkConstants.URI_API_PREFIX_PATH_R0 + "register") |
There was a problem hiding this comment.
is this something we should consider adding to the spec? it looks like we're relying on the register endpoint to fail
There was a problem hiding this comment.
the register endpoint will fail for sure, we are not providing any data to the request. Also if registration is disabled, I'm not sure what will happen.
This is a temporary workaround waiting for matrix-org/matrix-spec-proposals#3012 to land
| /** | ||
| * It's only possible to use this value for [getTerms] | ||
| */ | ||
| Homeserver |
There was a problem hiding this comment.
do you think it's worth having a separate getHomeserverTerms to avoid potential misunderstandings with this api?
There was a problem hiding this comment.
I though about it, will iterate.
| class ElementLegals @Inject constructor( | ||
| private val stringProvider: StringProvider | ||
| ) { | ||
| /** |
There was a problem hiding this comment.
small nit: I don't think this comment/doc adds much, do you think it's needed? renaming getData to getServerPolicies would avoid the need for a comment
There was a problem hiding this comment.
Probably but a bit more confusing, since there is no server involved here...
ouchadam
left a comment
There was a problem hiding this comment.
awesome stuff! 💯 hopefully this helps reduce our google play rejections
49721ed to
bf7907a
Compare
|
Force-pushed to fix merge conflict in VectorPreferences |
Implement the first item of #4594
New
Legalssection in the main setting menu:@amshakal which icon can I used for this item?
EDIT: icon updated
Legals screen
Help and About screen updated
With a new help section. Fixes #4638