feat: 🌸
This commit is contained in:
parent
74e04e1c7d
commit
e91b2648cc
41 changed files with 756 additions and 92 deletions
|
|
@ -13,6 +13,7 @@ import {
|
|||
isProtectedEvent,
|
||||
isReplaceable
|
||||
} from './event'
|
||||
import { normalizeHttpUrl } from './url'
|
||||
|
||||
// https://github.com/nostr-protocol/nips/blob/master/25.md
|
||||
export function createReactionDraftEvent(event: Event, emoji: TEmoji | string = '+'): TDraftEvent {
|
||||
|
|
@ -346,6 +347,15 @@ export function createBookmarkDraftEvent(tags: string[][], content = ''): TDraft
|
|||
}
|
||||
}
|
||||
|
||||
export function createBlossomServerListDraftEvent(servers: string[]): TDraftEvent {
|
||||
return {
|
||||
kind: ExtendedKind.BLOSSOM_SERVER_LIST,
|
||||
content: '',
|
||||
tags: servers.map((server) => ['server', normalizeHttpUrl(server)]),
|
||||
created_at: dayjs().unix()
|
||||
}
|
||||
}
|
||||
|
||||
function generateImetaTags(imageUrls: string[]) {
|
||||
return imageUrls
|
||||
.map((imageUrl) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue