feat: add Boris branding to highlight alt tag

This commit is contained in:
Gigi
2025-10-06 07:39:45 +01:00
parent 0e992ae814
commit beeb296d3b

View File

@@ -34,6 +34,14 @@ export async function createHighlight(
comment ? { comment } : undefined comment ? { comment } : undefined
) )
// Update the alt tag to identify Boris as the creator
const altTagIndex = highlightEvent.tags.findIndex(tag => tag[0] === 'alt')
if (altTagIndex !== -1) {
highlightEvent.tags[altTagIndex] = ['alt', 'Highlight created by Boris. readwithboris.com']
} else {
highlightEvent.tags.push(['alt', 'Highlight created by Boris. readwithboris.com'])
}
// Sign the event // Sign the event
const signedEvent = await factory.sign(highlightEvent) const signedEvent = await factory.sign(highlightEvent)