Skip to content

Commit 1329fae

Browse files
fsola-sqcodex
andcommitted
fix(profiles): keep issuer in verification details
Co-authored-by: Codex <[email protected]> Signed-off-by: Franco Sola <[email protected]>
1 parent d48b605 commit 1329fae

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎src/bundled/profiles/ProfilePanel.test.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,8 @@ it("shows historical verification time and issuer, discloses cache, and hides di
654654
);
655655
sink?.eose();
656656
});
657-
expect(
658-
await screen.findByRole("heading", { name: "Alice · Example" }),
659-
).toBeVisible();
660-
expect(screen.getByText(/Name verified.*@alice/)).toBeVisible();
657+
expect(await screen.findByRole("heading", { name: "Alice" })).toBeVisible();
658+
expect(screen.getByText(/Name verified by Example.*@alice/)).toBeVisible();
661659
expect(screen.getByText("Alice Example")).toBeVisible();
662660
await userEvent.setup().click(screen.getByRole("tab", { name: "Info" }));
663661
expect(screen.getByText("Name verified by Example")).toBeVisible();

‎src/bundled/profiles/ProfilePanel.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ function ProfileDetails({
442442
<CheckCircleIcon aria-hidden="true" />
443443
)}{" "}
444444
{profile.verified.status === "checked"
445-
? "Name verified"
446-
: "Cached verification"}{" "}
445+
? `Name verified by ${profile.verified.issuerLabel}`
446+
: `Cached verification from ${profile.verified.issuerLabel}`}{" "}
447447
· @{profile.verified.username}
448448
</p>
449449
)}

‎src/features/relay/profile-directory.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function createProfileDirectory(
120120
id,
121121
Object.freeze({
122122
...base,
123-
name: `${value.displayName} · ${value.issuerLabel}`,
123+
name: value.displayName,
124124
username: value.username,
125125
verified: value,
126126
}),

‎src/features/relay/verified-profile.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ it("overlays verified names, qualifies collisions, preserves kind 0 details, and
294294
sink.event(projection());
295295
sink.eose();
296296
const profile = directory.queries.snapshot().get(alice.pubkey);
297-
expect(profile?.name).toBe("Alice · Example");
297+
expect(profile?.name).toBe("Alice");
298298
expect(profile?.about).toBe("About Alice");
299299
expect(profile?.picture).toBe("https://example.test/alice.png");
300300
expect(profile?.verified?.status).toBe("checked");
@@ -483,7 +483,7 @@ it("wires session profile demand, live updates, disconnection, and refreshed dis
483483
sink.event(projection());
484484
sink.eose();
485485
expect(owner.session.profiles.snapshot().get(alice.pubkey)?.name).toBe(
486-
"Alice · Example",
486+
"Alice",
487487
);
488488
expect(
489489
owner.session.profiles.snapshot().get(alice.pubkey)?.verified?.status,

0 commit comments

Comments
 (0)