From e59880e26776a2873b40b240d1b40ea8f598454d Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Wed, 8 May 2024 15:14:45 +0200 Subject: [PATCH] Implement /stopshare. --- CHANGES | 1 + static/galene.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 1466aea..9780705 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ Galene 0.9 (unreleased) menu) that discloses the IP address from which a user connected. * Implemented a contextual menu that triggers on a double click on a chat entry. + * Added a new command "/stopshare". 14 April 2024: Galene 0.8.2 diff --git a/static/galene.js b/static/galene.js index 8678c97..a46625c 100644 --- a/static/galene.js +++ b/static/galene.js @@ -1612,7 +1612,7 @@ function closeUpMedia(label) { */ function findUpMedia(label) { for(let id in serverConnection.up) { - let c = serverConnection.up[id] + let c = serverConnection.up[id]; if(c.label === label) return c; } @@ -3382,6 +3382,12 @@ commands.replace = { } }; +commands.stopshare = { + description: 'stop screen share', + f: (c, r) => { + closeUpMedia('screenshare'); + } +} /** * parseCommand splits a string into two space-separated parts. The first