*Add support for destroy

This commit is contained in:
Derrick Hammer 2023-04-08 22:50:56 -04:00
parent 40c042bb49
commit b42069231c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 2 deletions

View File

@ -556,8 +556,9 @@ async function createProtomuxMessage(aq: ActiveQuery) {
}; };
aq.setReceiveUpdate?.((data) => { aq.setReceiveUpdate?.((data) => {
if (data.action === "send") { if (["send", "destroy"].includes(data.action)) {
message.send(...data.args); message[data.action](...data.args);
return;
} }
defers[data.action]?.resolve(data.args); defers[data.action]?.resolve(data.args);