From 49002c87bc7eac86fbc4b9bea84a741acc272c3b Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 8 Dec 2017 15:19:30 +0000 Subject: [PATCH] More doc --- src/cryptodevices.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/cryptodevices.js b/src/cryptodevices.js index bfa7328561..b2d308d741 100644 --- a/src/cryptodevices.js +++ b/src/cryptodevices.js @@ -51,6 +51,14 @@ export function getUnknownDevicesForRoom(matrixClient, room) { }); } +/** + * Show the UnknownDeviceDialog for a given room. The dialog will inform the user + * that messages they sent to this room have not been sent due to unknown devices + * being present. + * + * @param {MatrixClient} matrixClient A MatrixClient + * @param {Room} room js-sdk room object representing the room + */ export function showUnknownDeviceDialogForMessages(matrixClient, room) { getUnknownDevicesForRoom(matrixClient, room).then((unknownDevices) => { const onSendClicked = () => { @@ -68,6 +76,14 @@ export function showUnknownDeviceDialogForMessages(matrixClient, room) { }); } +/** + * Show the UnknownDeviceDialog for a given room. The dialog will inform the user + * that a call they tried to place or answer in the room couldn't be placed or + * answered due to unknown devices being present. + * + * @param {MatrixClient} matrixClient A MatrixClient + * @param {Room} room js-sdk room object representing the room + */ export function showUnknownDeviceDialogForCalls(matrixClient, room, sendAnyway, sendAnywayLabel, sendLabel) { getUnknownDevicesForRoom(matrixClient, room).then((unknownDevices) => { const UnknownDeviceDialog = sdk.getComponent('dialogs.UnknownDeviceDialog');