Mercurial > libervia-backend
comparison libervia/backend/plugins/plugin_xep_0338.py @ 4122:52a89ddf3087
plugin XEP-0338: be sure to add the `<group>` element only once:
rel 424
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 03 Oct 2023 15:27:07 +0200 |
parents | 4b842c1fb686 |
children | c8b19a32f5c0 |
comparison
equal
deleted
inserted
replaced
4121:b2709504586a | 4122:52a89ddf3087 |
---|---|
122 content_name: str, | 122 content_name: str, |
123 media: str, | 123 media: str, |
124 media_data: dict, | 124 media_data: dict, |
125 desc_elt: domish.Element, | 125 desc_elt: domish.Element, |
126 ) -> None: | 126 ) -> None: |
127 jingle_elt = session["jingle_elt"] | 127 if content_name == next(iter(session["contents"])): |
128 self.add_group_element(jingle_elt, session) | 128 # the <group> element must be added only once, so we do it only for the first |
129 # content | |
130 jingle_elt = session["jingle_elt"] | |
131 self.add_group_element(jingle_elt, session) | |
129 | 132 |
130 def _jingle_handler_trigger( | 133 def _jingle_handler_trigger( |
131 self, | 134 self, |
132 client: SatXMPPEntity, | 135 client: SatXMPPEntity, |
133 action: str, | 136 action: str, |