relay: respect "local: true" filter

This commit is contained in:
Alex Gleason
2023-08-24 15:28:13 -05:00
parent a676b71d23
commit 658dd397f5
4 changed files with 46 additions and 7 deletions

View File

@@ -66,8 +66,8 @@ function trackRelays(event: Event) {
}
/** Distribute the event through active subscriptions. */
function streamOut(event: Event) {
for (const sub of Sub.matches(event)) {
async function streamOut(event: Event) {
for await (const sub of Sub.matches(event)) {
sub.socket.send(JSON.stringify(['EVENT', event]));
}
}