Skip to content

Adjust ActivityPub bookmark representation to match Betula#219

Open
bouncepaw wants to merge 1 commit into
ckolderup:mainfrom
bouncepaw:BetulaFormat
Open

Adjust ActivityPub bookmark representation to match Betula#219
bouncepaw wants to merge 1 commit into
ckolderup:mainfrom
bouncepaw:BetulaFormat

Conversation

@bouncepaw

Copy link
Copy Markdown

Hello!

This pull request changes the way bookmarks are represented over ActivityPub so they can be displayed by Betula. The same format is also used by Ties and Omnom. I'm also writing a FEP for this format.

I also fixed a bug with public keys.

This is what a Postmarks bookmark looks like in Betula:

Screenshot 2026-07-01 at 04 15 37

And in Mastodon:

Screenshot 2026-07-01 at 04 28 54

Comment thread src/activitypub.js

const noteMessage = {
'@context': 'https://www.w3.org/ns/activitystreams',
'@context': ['https://www.w3.org/ns/activitystreams', { Hashtag: 'https://www.w3.org/ns/activitystreams#Hashtag' }],

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For formal correctness. Practical implementations often ignore JSON-LD contexts, but some of them don't.

Comment thread src/activitypub.js
for (const follower of followers) {
const inbox = `${follower}/inbox`;
console.log(`Sending to ${follower}...`);
const inbox = await getInboxFromActorProfile(follower);

@bouncepaw bouncepaw Jul 1, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You took a shortcut here, which made sense, but the old logic failed for some servers such as Betula. Some form of caching would make sense, but I didn't find a db table with remote actors.

Comment thread src/signature.js
function getSignatureHeader(signature, signatureKeys) {
return [
`keyId="https://${domain}/u/${account}"`,
`keyId="https://${domain}/u/${account}#main-key"`,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it work before? It shouldn't have.

@ckolderup

Copy link
Copy Markdown
Owner

hey! Just FYI I'm traveling for the US holiday this week but this looks interesting and I'm putting it on my todo list when I get back next week. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants