crypto: Improve the docs a bit

This commit is contained in:
Damir Jelić 2021-04-20 14:34:54 +02:00
parent 389273d56a
commit 711e607fca
3 changed files with 13 additions and 3 deletions

View File

@ -867,6 +867,7 @@ internal class DefaultCryptoService @Inject constructor(
* @param warn true to warn when some unknown devices are detected.
*/
override fun setWarnOnUnknownDevices(warn: Boolean) {
// TODO this doesn't seem to be used anymore?
warnOnUnknownDevicesRepository.setWarnOnUnknownDevices(warn)
}

View File

@ -175,7 +175,7 @@ internal class OlmMachine(user_id: String, device_id: String, path: File, device
*
* After the request was sent out and a successful response was received
* the response body should be passed back to the state machine using the
* mark_request_as_sent method.
* markRequestAsSent() method.
*
* @return the list of requests that needs to be sent to the homeserver
*/
@ -259,7 +259,7 @@ internal class OlmMachine(user_id: String, device_id: String, path: File, device
*
* After the request was sent out and a successful response was received
* the response body should be passed back to the state machine using the
* mark_request_as_sent() method.
* markRequestAsSent() method.
*
* This method should be called every time before a call to
* shareRoomKey() is made.
@ -279,7 +279,7 @@ internal class OlmMachine(user_id: String, device_id: String, path: File, device
*
* After the request was sent out and a successful response was received
* the response body should be passed back to the state machine using the
* mark_request_as_sent() method.
* markRequestAsSent() method.
*
* This method should be called every time before a call to
* `encrypt()` with the given `room_id` is made.

View File

@ -432,6 +432,15 @@ impl OlmMachine {
})
}
/// Request or re-request a room key that was used to encrypt the given
/// event.
///
/// # Arguments
///
/// * `event` - The undecryptable event that we would wish to request a room
/// key for.
///
/// * `room_id` - The id of the room the event was sent to.
pub fn request_room_key(
&self,
event: &str,