comparison libervia/backend/plugins/plugin_comp_ap_gateway/__init__.py @ 4183:6784d07b99c8

plugin XEP-053, component AP gateway: use the new `trigger.add_with_check` method
author Goffi <goffi@goffi.org>
date Sat, 09 Dec 2023 19:20:13 +0100
parents e92c32014024
children 49019947cc76
comparison
equal deleted inserted replaced
4182:4dc00e848961 4183:6784d07b99c8
164 priority=1000 164 priority=1000
165 ) 165 )
166 self.pubsub_service = APPubsubService(self) 166 self.pubsub_service = APPubsubService(self)
167 self.ad_hoc = APAdHocService(self) 167 self.ad_hoc = APAdHocService(self)
168 self.ap_events = APEvents(self) 168 self.ap_events = APEvents(self)
169 host.trigger.add("message_received", self._message_received_trigger, priority=-1000) 169 host.trigger.add_with_check(
170 host.trigger.add("XEP-0424_retract_received", self._on_message_retract) 170 "message_received",
171 host.trigger.add("XEP-0372_ref_received", self._on_reference_received) 171 self,
172 self._message_received_trigger,
173 priority=-1000
174 )
175 host.trigger.add_with_check(
176 "XEP-0424_retract_received",
177 self,
178 self._on_message_retract
179 )
180 host.trigger.add_with_check(
181 "XEP-0372_ref_received",
182 self,
183 self._on_reference_received
184 )
172 185
173 host.bridge.add_method( 186 host.bridge.add_method(
174 "ap_send", 187 "ap_send",
175 ".plugin", 188 ".plugin",
176 in_sign="sss", 189 in_sign="sss",