Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 2547777

Browse files
authored
Tweak copy for user verification toast (#12605)
* Tweak copy for user verification toast Signed-off-by: Michael Telatynski <[email protected]> * Update tests Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent 8b4e3e6 commit 2547777

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

playwright/e2e/crypto/verification.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ test.describe("User verification", () => {
280280
// it should contain the details of the requesting user
281281
await expect(toast.getByText(`Bob (${bob.credentials.userId})`)).toBeVisible();
282282
// Accept
283-
await toast.getByRole("button", { name: "Verify Session" }).click();
283+
await toast.getByRole("button", { name: "Verify User" }).click();
284284

285285
// request verification by emoji
286286
await page.locator("#mx_RightPanel").getByRole("button", { name: "Verify by emoji" }).click();
@@ -324,7 +324,7 @@ test.describe("User verification", () => {
324324

325325
// Accept verification via toast
326326
const toast = await toasts.getToast("Verification requested");
327-
await toast.getByRole("button", { name: "Verify Session" }).click();
327+
await toast.getByRole("button", { name: "Verify User" }).click();
328328

329329
// request verification by emoji
330330
await page.locator("#mx_RightPanel").getByRole("button", { name: "Verify by emoji" }).click();

src/components/views/toasts/VerificationRequestToast.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
185185
<GenericToast
186186
description={description}
187187
detail={detail}
188-
acceptLabel={_t("encryption|verification|request_toast_accept")}
188+
acceptLabel={
189+
request.isSelfVerification || !request.roomId
190+
? _t("encryption|verification|request_toast_accept")
191+
: _t("encryption|verification|request_toast_accept_user")
192+
}
189193
onAccept={this.accept}
190194
rejectLabel={declineLabel}
191195
onReject={this.cancel}

src/i18n/strings/en_EN.json

+1
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,7 @@
997997
"qr_reciprocate_same_shield_device": "Almost there! Is your other device showing the same shield?",
998998
"qr_reciprocate_same_shield_user": "Almost there! Is %(displayName)s showing the same shield?",
999999
"request_toast_accept": "Verify Session",
1000+
"request_toast_accept_user": "Verify User",
10001001
"request_toast_decline_counter": "Ignore (%(counter)s)",
10011002
"request_toast_detail": "%(deviceId)s from %(ip)s",
10021003
"reset_proceed_prompt": "Proceed with reset",

0 commit comments

Comments
 (0)