[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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user