Unknown event fetching
Damus will now try really hard to find unknown events. It will use the event relay hints to connect to new relays and fetch any id that is missing.
This commit is contained in:
parent
994305ccff
commit
45b36a9945
2 changed files with 222 additions and 74 deletions
|
@ -233,6 +233,7 @@ Relay.prototype.close = function relayClose() {
|
|||
}
|
||||
|
||||
Relay.prototype.subscribe = function relay_subscribe(sub_id, filters) {
|
||||
//console.debug("[%s] %s %s", this.url, sub_id, filters)
|
||||
if (Array.isArray(filters))
|
||||
this.send(["REQ", sub_id, ...filters])
|
||||
else
|
||||
|
@ -240,6 +241,7 @@ Relay.prototype.subscribe = function relay_subscribe(sub_id, filters) {
|
|||
}
|
||||
|
||||
Relay.prototype.unsubscribe = function relay_unsubscribe(sub_id) {
|
||||
//console.debug("[%s] CLOSE %s", this.url, sub_id)
|
||||
this.send(["CLOSE", sub_id])
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue