Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4446.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Unable to establish Olm outbound session from fallback key
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,22 @@ 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>>,

/**
* We have to store the original json because it can contain other fields
* that we don't support yet but they would be needed to check signatures
*/
private val rawMap: JsonDict

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add doc like other fields please?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

) {

/**
* @return the signed data map
*/
fun signalableJSONDictionary(): Map<String, Any> {
return mapOf("key" to value)
return rawMap.filter {
it.key != "signatures" && it.key != "unsigned"
}
}

/**
Expand Down Expand Up @@ -82,6 +90,7 @@ data class MXKey(
* <pre>
* "signed_curve25519:AAAAFw": {
* "key": "IjwIcskng7YjYcn0tS8TUOT2OHHtBSfMpcfIczCgXj4",
* "fallback" : true|false
* "signatures": {
* "@userId:matrix.org": {
* "ed25519:GMJRREOASV": "EUjp6pXzK9u3SDFR\/qLbzpOi3bEREeI6qMnKzXu992HsfuDDZftfJfiUXv9b\/Hqq1og4qM\/vCQJGTHAWMmgkCg"
Expand All @@ -107,7 +116,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
)
}
}
Expand Down