Fix repository delte notification and CLOSE buffering

This commit is contained in:
Jon Staab
2024-06-03 12:27:53 -07:00
parent 35eccf7467
commit d4cecd5e50
4 changed files with 29 additions and 5 deletions
+6 -1
View File
@@ -30,10 +30,15 @@ export class Connection extends Emitter {
const [verb, ...extra] = asMessage(message)
if (['AUTH', 'CLOSE'].includes(verb)) {
if (verb === 'AUTH') {
return false
}
// Only close reqs that have been sent
if (verb === 'CLOSE') {
return !this.meta.pendingRequests.has(extra[0])
}
// Allow relay requests through
if (verb === 'EVENT' && extra[0].kind === 28934) {
return false