Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0163.py @ 2272:b5befe7722d3
plugin XEP-0060: added sendItem and psItemSend bridge method as a way to send directly raw XML for an item + use client instead of profile_key in publish + renamed psItemGet to psItemsGet
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 27 Jun 2017 19:38:20 +0200 |
parents | 33c8c4973743 |
children | 972e33507609 |
comparison
equal
deleted
inserted
replaced
2271:2fae89f30b8d | 2272:b5befe7722d3 |
---|---|
96 | 96 |
97 @param node(unicode): node namespace | 97 @param node(unicode): node namespace |
98 @param data: domish.Element to use as payload | 98 @param data: domish.Element to use as payload |
99 @param profile: profile which send the data | 99 @param profile: profile which send the data |
100 """ | 100 """ |
101 | 101 client = self.host.getClient(profile) |
102 item = pubsub.Item(payload=data) | 102 item = pubsub.Item(payload=data) |
103 return self.host.plugins["XEP-0060"].publish(None, node, [item], profile_key=profile) | 103 return self.host.plugins["XEP-0060"].publish(client, None, node, [item]) |
104 | 104 |
105 def PEPSend(self, event_type, data, profile_key=C.PROF_KEY_NONE): | 105 def PEPSend(self, event_type, data, profile_key=C.PROF_KEY_NONE): |
106 """Send personal event after checking the data is alright | 106 """Send personal event after checking the data is alright |
107 | 107 |
108 @param event_type: type of event (eg: MOOD, TUNE), must be in self.pep_out_cb.keys() | 108 @param event_type: type of event (eg: MOOD, TUNE), must be in self.pep_out_cb.keys() |