odoo/odoo#188084

Created by fw-bot
Merged at 5c10f9b4c62c22473e2b1d0d11c6ee265e4a9248

Statuses:

label
odoo-dev:18.0-17.0-voice-notes-fix-tso-xvqK-fw
head
0577af562d1e8a85dcf29de6a47a5e863aaef332
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