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

Commit

Permalink
Tweak copy for user verification toast (#12605)
Browse files Browse the repository at this point in the history
* Tweak copy for user verification toast

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
t3chguy authored Jun 13, 2024
1 parent 8b4e3e6 commit 2547777
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions playwright/e2e/crypto/verification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ test.describe("User verification", () => {
// it should contain the details of the requesting user
await expect(toast.getByText(`Bob (${bob.credentials.userId})`)).toBeVisible();
// Accept
await toast.getByRole("button", { name: "Verify Session" }).click();
await toast.getByRole("button", { name: "Verify User" }).click();

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

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

// request verification by emoji
await page.locator("#mx_RightPanel").getByRole("button", { name: "Verify by emoji" }).click();
Expand Down
6 changes: 5 additions & 1 deletion src/components/views/toasts/VerificationRequestToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
<GenericToast
description={description}
detail={detail}
acceptLabel={_t("encryption|verification|request_toast_accept")}
acceptLabel={
request.isSelfVerification || !request.roomId
? _t("encryption|verification|request_toast_accept")
: _t("encryption|verification|request_toast_accept_user")
}
onAccept={this.accept}
rejectLabel={declineLabel}
onReject={this.cancel}
Expand Down
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@
"qr_reciprocate_same_shield_device": "Almost there! Is your other device showing the same shield?",
"qr_reciprocate_same_shield_user": "Almost there! Is %(displayName)s showing the same shield?",
"request_toast_accept": "Verify Session",
"request_toast_accept_user": "Verify User",
"request_toast_decline_counter": "Ignore (%(counter)s)",
"request_toast_detail": "%(deviceId)s from %(ip)s",
"reset_proceed_prompt": "Proceed with reset",
Expand Down

0 comments on commit 2547777

Please sign in to comment.