Cancel room key requests, if any match the given requestBody
resolves when the request has been updated in our pending list.
Look for room key requests by target device and state
Target user ID
Target device ID
resolves to a list of all the OutgoingRoomKeyRequest
Queue up a room key request, if we haven't already queued or sent one.
The requestBody
is compared (with a deep-equality check) against
previous queued or sent requests and if it matches, no change is made.
Otherwise, a request is added to the pending list, and a job is started
in the background to send it.
whether to resend the key request if there is already one
resolves when the request has been added to the pending list (or we have established that a similar request already exists)
Find anything in
sent
state, and kick it around the loop again. This is intended for situations where something substantial has changed, and we don't really expect the other end to even care about the cancellation. For example, after initialization or self-verification.