Fix fallback otk support
This commit is contained in:
parent
474e2aadbe
commit
5b76d4b682
|
@ -0,0 +1 @@
|
|||
Unable to establish Olm outbound session from fallback key
|
|
@ -38,14 +38,18 @@ data class MXKey(
|
|||
/**
|
||||
* signature user Id to [deviceid][signature]
|
||||
*/
|
||||
private val signatures: Map<String, Map<String, String>>
|
||||
private val signatures: Map<String, Map<String, String>>,
|
||||
|
||||
private val rawMap: JsonDict
|
||||
) {
|
||||
|
||||
/**
|
||||
* @return the signed data map
|
||||
*/
|
||||
fun signalableJSONDictionary(): Map<String, Any> {
|
||||
return mapOf("key" to value)
|
||||
return rawMap.filter {
|
||||
it.key != "signatures" && it.key != "unsigned"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,6 +86,7 @@ data class MXKey(
|
|||
* <pre>
|
||||
* "signed_curve25519:AAAAFw": {
|
||||
* "key": "IjwIcskng7YjYcn0tS8TUOT2OHHtBSfMpcfIczCgXj4",
|
||||
* "fallback" : true|false
|
||||
* "signatures": {
|
||||
* "@userId:matrix.org": {
|
||||
* "ed25519:GMJRREOASV": "EUjp6pXzK9u3SDFR\/qLbzpOi3bEREeI6qMnKzXu992HsfuDDZftfJfiUXv9b\/Hqq1og4qM\/vCQJGTHAWMmgkCg"
|
||||
|
@ -107,7 +112,8 @@ data class MXKey(
|
|||
type = components[0],
|
||||
keyId = components[1],
|
||||
value = params["key"] as String,
|
||||
signatures = params["signatures"] as Map<String, Map<String, String>>
|
||||
signatures = params["signatures"] as Map<String, Map<String, String>>,
|
||||
rawMap = params
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue