Add pubkey to tags with hints
This commit is contained in:
@@ -224,17 +224,17 @@ export class Router {
|
|||||||
tagPubkey = (pubkey: string) =>
|
tagPubkey = (pubkey: string) =>
|
||||||
Tag.from(["p", pubkey, this.FromPubkeys([pubkey]).getUrl()])
|
Tag.from(["p", pubkey, this.FromPubkeys([pubkey]).getUrl()])
|
||||||
|
|
||||||
tagEventId = (event: Rumor, ...extra: string[]) =>
|
tagEventId = (event: Rumor, mark: string) =>
|
||||||
Tag.from(["e", event.id, this.Event(event).getUrl(), ...extra])
|
Tag.from(["e", event.id, this.Event(event).getUrl(), mark, event.pubkey])
|
||||||
|
|
||||||
tagEventAddress = (event: Rumor, ...extra: string[]) =>
|
tagEventAddress = (event: Rumor, mark: string) =>
|
||||||
Tag.from(["a", getAddress(event), this.Event(event).getUrl(), ...extra])
|
Tag.from(["a", getAddress(event), this.Event(event).getUrl(), mark, event.pubkey])
|
||||||
|
|
||||||
tagEvent = (event: Rumor, ...extra: string[]) => {
|
tagEvent = (event: Rumor, mark: string) => {
|
||||||
const tags = [this.tagEventId(event, ...extra)]
|
const tags = [this.tagEventId(event, mark)]
|
||||||
|
|
||||||
if (isReplaceable(event)) {
|
if (isReplaceable(event)) {
|
||||||
tags.push(this.tagEventAddress(event, ...extra))
|
tags.push(this.tagEventAddress(event, mark))
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Tags(tags)
|
return new Tags(tags)
|
||||||
|
|||||||
Reference in New Issue
Block a user