Merge branch 'release/1.0.13'

This commit is contained in:
Benoit Marty 2020-12-18 10:59:54 +01:00
commit 0412b87ad1
9 changed files with 22 additions and 9 deletions

View File

@ -1,3 +1,9 @@
Changes in Element 1.0.13 (2020-12-18)
===================================================
Bugfix 🐛:
- Fix MSC2858 implementation details (#2540)
Changes in Element 1.0.12 (2020-12-15) Changes in Element 1.0.12 (2020-12-15)
=================================================== ===================================================

View File

@ -165,7 +165,7 @@ In this case, the user can click on "Sign in with SSO" and the native web browse
> https://homeserver.with.sso/_matrix/client/r0/login/sso/redirect?redirectUrl=element%3A%2F%element > https://homeserver.with.sso/_matrix/client/r0/login/sso/redirect?redirectUrl=element%3A%2F%element
The parameter `redirectUrl` is set to `element://element`. The parameter `redirectUrl` is set to `element://connect`.
ChromeCustomTabs are an intermediate way to display a WebPage, between a WebView and using the external browser. More info can be found [here](https://developer.chrome.com/multidevice/android/customtabs) ChromeCustomTabs are an intermediate way to display a WebPage, between a WebView and using the external browser. More info can be found [here](https://developer.chrome.com/multidevice/android/customtabs)
@ -175,7 +175,7 @@ During the process, user may be asked to validate an email by clicking on a link
Once the process is finished, the web page will call the `redirectUrl` with an extra parameter `loginToken` Once the process is finished, the web page will call the `redirectUrl` with an extra parameter `loginToken`
> element://element?loginToken=MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy > element://connect?loginToken=MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy
This navigation is intercepted by Element by the `LoginActivity`, which will then ask the homeserver to convert this `loginToken` to an access token This navigation is intercepted by Element by the `LoginActivity`, which will then ask the homeserver to convert this `loginToken` to an access token

View File

@ -0,0 +1,2 @@
Main changes in this version: URL Preview, new Emoji keyboard, new room settings capabilities, and snow for Christmas!
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.0.12

View File

@ -33,5 +33,6 @@ const val REGISTER_FALLBACK_PATH = "/_matrix/static/client/register/"
* Ref: https://matrix.org/docs/spec/client_server/latest#sso-client-login * Ref: https://matrix.org/docs/spec/client_server/latest#sso-client-login
*/ */
const val SSO_REDIRECT_PATH = "/_matrix/client/r0/login/sso/redirect" const val SSO_REDIRECT_PATH = "/_matrix/client/r0/login/sso/redirect"
const val MSC2858_SSO_REDIRECT_PATH = "/_matrix/client/unstable/org.matrix.msc2858/login/sso/redirect"
const val SSO_REDIRECT_URL_PARAM = "redirectUrl" const val SSO_REDIRECT_URL_PARAM = "redirectUrl"

View File

@ -42,6 +42,6 @@ internal data class LoginFlow(
* the client can show a button for each of the supported providers * the client can show a button for each of the supported providers
* See MSC #2858 * See MSC #2858
*/ */
@Json(name = "identity_providers") @Json(name = "org.matrix.msc2858.identity_providers")
val ssoIdentityProvider: List<SsoIdentityProvider>? val ssoIdentityProvider: List<SsoIdentityProvider>?
) )

View File

@ -93,7 +93,7 @@ internal class DefaultIdentityBulkLookupTask @Inject constructor(
} catch (failure: Throwable) { } catch (failure: Throwable) {
// Catch invalid hash pepper and retry // Catch invalid hash pepper and retry
if (canRetry && failure is Failure.ServerError && failure.error.code == MatrixError.M_INVALID_PEPPER) { if (canRetry && failure is Failure.ServerError && failure.error.code == MatrixError.M_INVALID_PEPPER) {
// This is not documented, by the error can contain the new pepper! // This is not documented, but the error can contain the new pepper!
if (!failure.error.newLookupPepper.isNullOrEmpty()) { if (!failure.error.newLookupPepper.isNullOrEmpty()) {
// Store it and use it right now // Store it and use it right now
hashDetailResponse.copy(pepper = failure.error.newLookupPepper) hashDetailResponse.copy(pepper = failure.error.newLookupPepper)

View File

@ -17,7 +17,7 @@ androidExtensions {
// Note: 2 digits max for each value // Note: 2 digits max for each value
ext.versionMajor = 1 ext.versionMajor = 1
ext.versionMinor = 0 ext.versionMinor = 0
ext.versionPatch = 12 ext.versionPatch = 13
static def getGitTimestamp() { static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct' def cmd = 'git show -s --format=%ct'

View File

@ -95,8 +95,9 @@
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="element" /> <data
<data android:host="element" /> android:host="connect"
android:scheme="element" />
</intent-filter> </intent-filter>
</activity> </activity>

View File

@ -23,6 +23,7 @@ import com.airbnb.mvrx.PersistState
import com.airbnb.mvrx.Success import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized import com.airbnb.mvrx.Uninitialized
import im.vector.app.core.extensions.appendParamToUrl import im.vector.app.core.extensions.appendParamToUrl
import org.matrix.android.sdk.api.auth.MSC2858_SSO_REDIRECT_PATH
import org.matrix.android.sdk.api.auth.SSO_REDIRECT_PATH import org.matrix.android.sdk.api.auth.SSO_REDIRECT_PATH
import org.matrix.android.sdk.api.auth.SSO_REDIRECT_URL_PARAM import org.matrix.android.sdk.api.auth.SSO_REDIRECT_URL_PARAM
@ -72,9 +73,11 @@ data class LoginViewState(
fun getSsoUrl(providerId: String?): String { fun getSsoUrl(providerId: String?): String {
return buildString { return buildString {
append(homeServerUrl?.trim { it == '/' }) append(homeServerUrl?.trim { it == '/' })
append(SSO_REDIRECT_PATH)
if (providerId != null) { if (providerId != null) {
append(MSC2858_SSO_REDIRECT_PATH)
append("/$providerId") append("/$providerId")
} else {
append(SSO_REDIRECT_PATH)
} }
// Set a redirect url we will intercept later // Set a redirect url we will intercept later
appendParamToUrl(SSO_REDIRECT_URL_PARAM, VECTOR_REDIRECT_URL) appendParamToUrl(SSO_REDIRECT_URL_PARAM, VECTOR_REDIRECT_URL)
@ -87,6 +90,6 @@ data class LoginViewState(
companion object { companion object {
// Note that the domain can be displayed to the user for confirmation that he trusts it. So use a human readable string // Note that the domain can be displayed to the user for confirmation that he trusts it. So use a human readable string
private const val VECTOR_REDIRECT_URL = "element://element" private const val VECTOR_REDIRECT_URL = "element://connect"
} }
} }