From e303992e451856f9bf199e3563fb2513e6b17907 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 25 Mar 2022 17:03:42 +0100 Subject: [PATCH] Call onuser when deleting stream. --- static/protocol.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/protocol.js b/static/protocol.js index 2217355..816b80a 100644 --- a/static/protocol.js +++ b/static/protocol.js @@ -1106,7 +1106,9 @@ Stream.prototype.close = function(replace) { delete(c.sc.down[c.id]); else console.warn('Closing unknown stream'); - recomputeUserStreams(c.sc, c.source); + let changed = recomputeUserStreams(c.sc, c.source); + if(changed && c.sc.onuser) + c.sc.onuser.call(c.sc, c.source, "change"); } c.sc = null;