feat: support for follow packs

This commit is contained in:
codytseng 2025-11-27 00:02:13 +08:00
parent cdab9aa19e
commit b21855c294
27 changed files with 384 additions and 24 deletions

View file

@ -77,6 +77,11 @@ export const toRelayReviews = (url: string) => `/relays/${encodeURIComponent(url
export const toMuteList = () => '/mutes'
export const toRizful = () => '/rizful'
export const toBookmarks = () => '/bookmarks'
export const toFollowPack = (eventOrId: Event | string) => {
if (typeof eventOrId === 'string') return `/follow-packs/${eventOrId}`
const naddr = getNoteBech32Id(eventOrId)
return `/follow-packs/${naddr}`
}
export const toChachiChat = (relay: string, d: string) => {
return `https://chachi.chat/${relay.replace(/^wss?:\/\//, '').replace(/\/$/, '')}/${d}`