feat(journal): trails profile-metadata field on federated actors
Mastodon renders PropertyValue attachments as the profile metadata
table — adds a '🥾 trails.cool' field linking to the user's canonical
profile, so it's human-visible that an account is a trails profile.
(The machine-readable signal stays NodeInfo; this is flair.) The link
carries rel=me so Mastodon can verify it once our HTML profile links
back.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d13a0fcd18
commit
08d0a78c57
2 changed files with 17 additions and 1 deletions
|
|
@ -95,6 +95,12 @@ describe("actor object", () => {
|
|||
expect(actor.preferredUsername).toBe("bruno");
|
||||
expect(actor.name).toBe("Bruno");
|
||||
expect(actor.summary).toBe("Riding bikes");
|
||||
// Profile-metadata field Mastodon renders ("this is a trails profile")
|
||||
const attachments = Array.isArray(actor.attachment) ? actor.attachment : [actor.attachment];
|
||||
const field = attachments.find((a: { type: string }) => a?.type === "PropertyValue");
|
||||
expect(field?.name).toBe("🥾 trails.cool");
|
||||
expect(field?.value).toContain('href="http://localhost:3000/users/bruno"');
|
||||
expect(field?.value).toContain('rel="me"');
|
||||
});
|
||||
|
||||
it("404s the actor for a private user", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue