Mercurial > libervia-backend
changeset 4054:4c8bf67bfbeb
plugin XEP-0176: fix candidates data format when calling Bridge's `ice_candidates_new`
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 29 May 2023 13:32:32 +0200 (19 months ago) |
parents | dd39e60ca2aa |
children | 38819c69aa39 |
files | sat/plugins/plugin_xep_0176.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0176.py Mon May 29 13:32:28 2023 +0200 +++ b/sat/plugins/plugin_xep_0176.py Mon May 29 13:32:32 2023 +0200 @@ -159,7 +159,7 @@ """Parse <transport> to a dict @param transport_elt: <transport> element - @return: ICE data (as in [build_description]) + @return: ICE data (as in [build_transport]) """ try: ice_data = { @@ -269,6 +269,8 @@ # responder side, we give our candidates transport_elt = self.build_transport(transport_data["local_ice_data"]) elif action == self._j.A_TRANSPORT_INFO: + + media_type = content_data["application_data"].get("media") new_ice_data = self.parse_transport(transport_elt) restart = self.update_candidates(transport_data, new_ice_data, local=False) if restart: @@ -280,7 +282,7 @@ self.host.bridge.ice_candidates_new( session["id"], - data_format.serialise(new_ice_data["candidates"]), + data_format.serialise({media_type: new_ice_data}), client.profile ) elif action == self._j.A_DESTROY: