mirror of
https://github.com/KoalaSat/nostros.git
synced 2024-09-29 06:30:47 +00:00
Request repost data
This commit is contained in:
parent
f22e0f730e
commit
950da9d0cb
@ -35,7 +35,7 @@ export const usernamePubKey: (name: string | undefined, pubKey: string | undefin
|
||||
export const formatPubKey: (pubKey: string | undefined) => string = (pubKey) => {
|
||||
if (!pubKey) return ''
|
||||
|
||||
return `${pubKey.slice(0, 6)}...${pubKey.slice(-6)}`
|
||||
return `${pubKey.slice(0, 8)}:${pubKey.slice(-8)}`
|
||||
}
|
||||
|
||||
export const getNip05Domain: (nip05: string | undefined) => string | null = (nip05) => {
|
||||
|
@ -93,26 +93,31 @@ export const MyFeed: React.FC<MyFeedProps> = ({ navigation, setProfileCardPubKey
|
||||
authors: notes.map((note) => note.pubkey ?? ''),
|
||||
},
|
||||
])
|
||||
const notedIds = notes.map((note) => note.id ?? '')
|
||||
const noteIds = notes.map((note) => note.id ?? '')
|
||||
getLastReaction(database, { eventIds: notes.map((note) => note.id ?? '') }).then(
|
||||
(lastReaction) => {
|
||||
relayPool?.subscribe('homepage-reactions', [
|
||||
{
|
||||
kinds: [Kind.Reaction],
|
||||
'#e': notedIds,
|
||||
'#e': noteIds,
|
||||
since: lastReaction?.created_at ?? 0,
|
||||
},
|
||||
])
|
||||
},
|
||||
)
|
||||
const repostIds = notes.filter((note) => note.repost_id).map((note) => note.id ?? '')
|
||||
getLastReply(database, { eventIds: notes.map((note) => note.id ?? '') }).then(
|
||||
(lastReply) => {
|
||||
relayPool?.subscribe('homepage-replies', [
|
||||
{
|
||||
kinds: [Kind.Text],
|
||||
'#e': notedIds,
|
||||
'#e': noteIds,
|
||||
since: lastReply?.created_at ?? 0,
|
||||
},
|
||||
{
|
||||
kinds: [Kind.Text],
|
||||
'#e': repostIds
|
||||
},
|
||||
])
|
||||
},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user