[FIX] mail: add missing notifition when leaving a channel

This will close the RTC session when a user leave a channel with a RTC session
open.

task-2646095

closes odoo/odoo#76849

X-original-commit: c5d2a17888d79e4b37cd8f9a690132b9cd556fbd
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Didier (did)
2021-09-20 17:52:51 +00:00
parent 2083e59281
commit d81a539362
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ class ChannelPartner(models.Model):
return super(ChannelPartner, self).write(vals)
def unlink(self):
self.sudo().rtc_session_ids.unlink()
self.sudo().rtc_session_ids._disconnect()
return super().unlink()
@api.model
@@ -822,6 +822,9 @@ function factory(dependencies) {
}
}
this.mailRtc && this.mailRtc.filterCallees(this.rtcSessions);
if (this.mailRtc && !this.mailRtc.currentRtcSession) {
this.endCall();
}
}
/**