mirror of
https://github.com/dergigi/boris.git
synced 2025-12-20 16:14:20 +01:00
feat: add Boris branding to highlight alt tag
This commit is contained in:
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user