From beeb296d3b59baacd7fa597132ef31f1981fe17f Mon Sep 17 00:00:00 2001 From: Gigi Date: Mon, 6 Oct 2025 07:39:45 +0100 Subject: [PATCH] feat: add Boris branding to highlight alt tag --- src/services/highlightCreationService.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/services/highlightCreationService.ts b/src/services/highlightCreationService.ts index 32ea7f09..21e79ae3 100644 --- a/src/services/highlightCreationService.ts +++ b/src/services/highlightCreationService.ts @@ -34,6 +34,14 @@ export async function createHighlight( 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 const signedEvent = await factory.sign(highlightEvent)