Skip to content

Commit

Permalink
fix relay hint in e tag to reply.
Browse files Browse the repository at this point in the history
  • Loading branch information
AsaiToshiya authored and fiatjaf committed Oct 2, 2024
1 parent 0f21202 commit 7147612
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ export function Editor({

let inReplyTo = []
if (parentId) {
inReplyTo.push(['e', parentId, relays[0] || '', 'reply'])
inReplyTo.push([
'e',
parentId,
Array.from(pool.current.seenOn.get(parentId))[0].url,
'reply'
])
}

let event = {
Expand Down
2 changes: 2 additions & 0 deletions src/NoComment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export function NoComment({
if (!baseTag) return

// query for comments
pool.current.trackRelays = true
let sub = pool.current.subscribeMany(chosenRelays,
[
{
Expand All @@ -148,6 +149,7 @@ export function NoComment({

return () => {
sub.close()
pool.current.trackRelays = false
}
}, [baseTag, chosenRelays.length])

Expand Down

0 comments on commit 7147612

Please sign in to comment.