[FIX] mail: prevent unnecessary re instantiation of the callViewer model
Before this commit, the callViewer model was re instantiated in cases when the amount of RTC session would change, which was not necessary if the call viewer was already present. This could cause tracebacks accessing deleted callViewers. closes odoo/odoo#76328 X-original-commit: d2c9cc55bbabd21cbbbc8a0e77f6935fdafddeea Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -72,6 +72,9 @@ function factory(dependencies) {
|
||||
*/
|
||||
_computeRtcCallViewer() {
|
||||
if (this.thread && this.thread.model === 'mail.channel' && this.thread.rtcSessions.length > 0) {
|
||||
if (this.rtcCallViewer) {
|
||||
return;
|
||||
}
|
||||
return create();
|
||||
}
|
||||
return unlink();
|
||||
|
||||
Reference in New Issue
Block a user