From 153d62eaf4e6aff477ef0622e6268c61b0e2e9d7 Mon Sep 17 00:00:00 2001 From: Rahul Prajapati Date: Wed, 1 Nov 2023 18:03:25 +0530 Subject: [PATCH] [FIX] mail: rtc session counting in updatertcsessions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit: The logic used to count the number of RTC Sessions was incorrect. Which led to multiple sounds being played sometimes. Etc, on start a meeting After this commit: Corrected the RTC Sessions counting logic. closes odoo/odoo#140628 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/discuss/call/common/rtc_service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/discuss/call/common/rtc_service.js b/addons/mail/static/src/discuss/call/common/rtc_service.js index 6a872f44b11..afebf60a8e4 100644 --- a/addons/mail/static/src/discuss/call/common/rtc_service.js +++ b/addons/mail/static/src/discuss/call/common/rtc_service.js @@ -1526,7 +1526,7 @@ export class Rtc { if (!channel) { return; } - const oldCount = Object.keys(channel.rtcSessions).length; + const oldCount = channel.rtcSessions.length; channel.rtcSessions = sessionsData; if (channel.rtcSessions.length > oldCount) { this.soundEffectsService.play("channel-join");