Fix parent hints
This commit is contained in:
+22
-10
@@ -117,19 +117,31 @@ export class Router {
|
|||||||
...this.getContextRelayGroups(event),
|
...this.getContextRelayGroups(event),
|
||||||
])
|
])
|
||||||
|
|
||||||
EventParent = (event: UnsignedEvent) =>
|
EventParent = (event: UnsignedEvent) => {
|
||||||
this.scenario([
|
const tags = Tags.fromEvent(event)
|
||||||
Tags.fromEvent(event).replies().relays().valueOf(),
|
|
||||||
this.options.getPubkeyRelays(event.pubkey, RelayMode.Inbox),
|
|
||||||
...this.getContextRelayGroups(event),
|
|
||||||
])
|
|
||||||
|
|
||||||
EventRoot = (event: UnsignedEvent) =>
|
return this.scenario([
|
||||||
this.scenario([
|
tags.replies().relays().valueOf(),
|
||||||
Tags.fromEvent(event).roots().relays().valueOf(),
|
|
||||||
this.options.getPubkeyRelays(event.pubkey, RelayMode.Inbox),
|
|
||||||
...this.getContextRelayGroups(event),
|
...this.getContextRelayGroups(event),
|
||||||
|
...tags.whereKey("p").values().valueOf()
|
||||||
|
.map(pk => this.options.getPubkeyRelays(pk, RelayMode.Outbox)),
|
||||||
|
tags.whereKey("p").relays().valueOf(),
|
||||||
|
this.options.getPubkeyRelays(event.pubkey, RelayMode.Inbox),
|
||||||
])
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
EventRoot = (event: UnsignedEvent) => {
|
||||||
|
const tags = Tags.fromEvent(event)
|
||||||
|
|
||||||
|
return this.scenario([
|
||||||
|
tags.roots().relays().valueOf(),
|
||||||
|
...this.getContextRelayGroups(event),
|
||||||
|
...tags.whereKey("p").values().valueOf()
|
||||||
|
.map(pk => this.options.getPubkeyRelays(pk, RelayMode.Outbox)),
|
||||||
|
tags.whereKey("p").relays().valueOf(),
|
||||||
|
this.options.getPubkeyRelays(event.pubkey, RelayMode.Inbox),
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
PublishEvent = (event: UnsignedEvent) => {
|
PublishEvent = (event: UnsignedEvent) => {
|
||||||
const tags = Tags.fromEvent(event)
|
const tags = Tags.fromEvent(event)
|
||||||
|
|||||||
Reference in New Issue
Block a user