[FIX] mail: rtc session counting in updatertcsessions

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) <seb@odoo.com>
This commit is contained in:
Rahul Prajapati
2023-11-02 18:23:14 +00:00
parent cf86759d1d
commit 153d62eaf4
@@ -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");