Some checks failed
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
17 lines
336 B
JavaScript
17 lines
336 B
JavaScript
$_.unneeded(_ => {
|
|
}, Infinity)
|
|
|
|
var subscribers = []
|
|
|
|
$_.receiver(e => {
|
|
if (e.type === "subscribe") {
|
|
if (!e.actor) throw Error('Got a subscribe message with no actor.');
|
|
console.log('subscribing: ' + json.encode(e.actor))
|
|
subscribers.push(e.actor)
|
|
return;
|
|
}
|
|
|
|
for (var a of subscribers)
|
|
$_.send(a, e);
|
|
});
|