Changeset 697
- Timestamp:
- 06/19/08 13:44:48 (6 months ago)
- Files:
-
- oss/headstock/headstock/api/discovery.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
oss/headstock/headstock/api/discovery.py
r677 r697 162 162 163 163 class SubscriptionsDiscovery(Entity): 164 def __init__(self, from_jid, to_jid, type=u'get', stanza_id=None):164 def __init__(self, from_jid, to_jid, node_name=None, type=u'get', stanza_id=None): 165 165 Entity.__init__(self, from_jid, to_jid, type, stanza_id) 166 166 self.subscriptions = [] 167 self.node_name = node_name 167 168 168 169 @staticmethod … … 170 171 iq = Entity.to_element(e) 171 172 query = E(u'query', namespace=XMPP_PUBSUB_NS, parent=iq) 172 E('subscriptions', namespace=XMPP_PUBSUB_NS, parent=query) 173 attr = None 174 if e.node_name: 175 attr = {u'node': e.node_name} 176 E('subscriptions', namespace=XMPP_PUBSUB_NS, attributes=attr, parent=query) 173 177 174 178 return iq … … 180 184 type=e.get_attribute_value('type'), 181 185 stanza_id=e.get_attribute_value('id')) 186 182 187 for c in e.xml_children: 183 188 if not isinstance(c, E):
