Crypto: BF: The share key dialog can appear with a 'null' device (#1683)

Make sure we download requester device keys before showing the share dialog.
Also, add "You added a new device '%@', which is requesting encryption keys." string
This commit is contained in:
manuroe
2017-12-05 15:47:39 +01:00
parent 0c0ccc1544
commit 7d0d6ad4b7
5 changed files with 70 additions and 13 deletions
@@ -38,11 +38,12 @@
Initialise an `RoomKeyRequestViewController` instance.
@param deviceInfo the device to share keys to.
@param wasNewDevice flag indicating whether this is the first time we meet the device.
@param session the related matrix session.
@param onComplete a block called when the the dialog is closed.
@return the newly created instance.
*/
- (instancetype)initWithDeviceInfo:(MXDeviceInfo*)deviceInfo andMatrixSession:(MXSession*)session onComplete:(void (^)())onComplete;
- (instancetype)initWithDeviceInfo:(MXDeviceInfo*)deviceInfo wasNewDevice:(BOOL)wasNewDevice andMatrixSession:(MXSession*)session onComplete:(void (^)())onComplete;
/**
Show the dialog in a modal way.