odoo/odoo#188064

Created by fw-bot
Merged at d2768c937f3511391853dfb4672757425f98ed69

Statuses:

label
odoo-dev:saas-17.4-17.0-voice-notes-fix-tso-BrK5-fw
head
2583010f6a37d7e10f7383cd7b52da0ec2f09e77
merged
8 months ago by Discuss, Thanh Son Dodeur (tso)
odoo/odoo
17.0 #187870
saas-17.2 #187979
saas-17.4 #188064
18.0 #188084
saas-18.1
saas-18.2
saas-18.3
saas-18.4
master #188373

[FW][FIX] discuss: release microphone if no longer needed by the recorder

Before this commit, there was no check to see if the microphone was still needed when starting recording, which could leave the stream active with no reference to it.

This commit fixes this issue by checking if the component is destroyed when the microphone promise is resolved.

Forward-Port-Of: #187979
Forward-Port-Of: #187870