diff --git a/src/components/views/right_panel/EncryptionInfo.js b/src/components/views/right_panel/EncryptionInfo.js index 610ea99511..007e2831ce 100644 --- a/src/components/views/right_panel/EncryptionInfo.js +++ b/src/components/views/right_panel/EncryptionInfo.js @@ -28,14 +28,26 @@ export const PendingActionSpinner = ({text}) => { ; }; -const EncryptionInfo = ({waitingForOtherParty, waitingForNetwork, member, onStartVerification, isRoomEncrypted}) => { +const EncryptionInfo = ({ + waitingForOtherParty, + waitingForNetwork, + member, + onStartVerification, + isRoomEncrypted, + inDialog, + isSelfVerification, +}) => { let content; if (waitingForOtherParty || waitingForNetwork) { let text; if (waitingForOtherParty) { - text = _t("Waiting for %(displayName)s to accept…", { - displayName: member.displayName || member.name || member.userId, - }); + if (isSelfVerification) { + text = _t("Waiting for you to accept on your other session…"); + } else { + text = _t("Waiting for %(displayName)s to accept…", { + displayName: member.displayName || member.name || member.userId, + }); + } } else { text = _t("Accepting…"); } @@ -66,6 +78,10 @@ const EncryptionInfo = ({waitingForOtherParty, waitingForNetwork, member, onStar ); } + if (inDialog) { + return content; + } + return

{_t("Encryption")}

diff --git a/src/components/views/right_panel/EncryptionPanel.js b/src/components/views/right_panel/EncryptionPanel.js index 6f884c4abf..152f4c0aa0 100644 --- a/src/components/views/right_panel/EncryptionPanel.js +++ b/src/components/views/right_panel/EncryptionPanel.js @@ -112,6 +112,9 @@ const EncryptionPanel = (props) => { const requested = (!request && isRequesting) || (request && (phase === PHASE_REQUESTED || phase === PHASE_UNSENT || phase === undefined)); + const isSelfVerification = request ? + request.isSelfVerification : + member.userId === MatrixClientPeg.get().getUserId(); if (!request || requested) { const initiatedByMe = (!request && isRequesting) || (request && request.initiatedByMe); return ( @@ -120,8 +123,10 @@ const EncryptionPanel = (props) => { isRoomEncrypted={isRoomEncrypted} onStartVerification={onStartVerification} member={member} + isSelfVerification={isSelfVerification} waitingForOtherParty={requested && initiatedByMe} - waitingForNetwork={requested && !initiatedByMe} /> + waitingForNetwork={requested && !initiatedByMe} + inDialog={inDialog} /> ); } else { return ( diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 389a30fe8f..68ff781ceb 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1212,6 +1212,7 @@ "URL previews are disabled by default for participants in this room.": "URL previews are disabled by default for participants in this room.", "In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.": "In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.", "When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.": "When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.", + "Waiting for you to accept on your other session…": "Waiting for you to accept on your other session…", "Waiting for %(displayName)s to accept…": "Waiting for %(displayName)s to accept…", "Accepting…": "Accepting…", "Start Verification": "Start Verification",