fix: /stop command crash + UnboundLocalError in streaming media delivery
Two fixes: 1. CLI /stop command crashed with 'cannot import name get_registry' — the code imported a non-existent function. Fixed to use the actual process_registry singleton and list_sessions() method. (Reported in #2458 by haiyuzhong1980) 2. Streaming media delivery used undefined 'adapter' variable — our PR #2382 called _deliver_media_from_response(adapter=adapter) but 'adapter' wasn't guaranteed to be defined in that scope. Fixed to resolve via self.adapters.get(source.platform). (Reported in #2424 by 42-evey)
This commit is contained in:
parent
f84230527c
commit
f69c47d9ae
2 changed files with 8 additions and 7 deletions
|
|
@ -2317,9 +2317,11 @@ class GatewayRunner:
|
|||
# delivered without this.
|
||||
if agent_result.get("already_sent"):
|
||||
if response:
|
||||
await self._deliver_media_from_response(
|
||||
response, event, adapter,
|
||||
)
|
||||
_media_adapter = self.adapters.get(source.platform)
|
||||
if _media_adapter:
|
||||
await self._deliver_media_from_response(
|
||||
response, event, _media_adapter,
|
||||
)
|
||||
return None
|
||||
|
||||
return response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue