mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Merge branch 'develop' of git://github.com/fritzy/SleekXMPP into develop
This commit is contained in:
commit
1ef112966b
2 changed files with 18 additions and 1 deletions
|
@ -146,11 +146,17 @@ class ClientXMPP(basexmpp, XMLStream):
|
|||
def updateRoster(self, jid, name=None, subscription=None, groups=[]):
|
||||
"""Add or change a roster item."""
|
||||
iq = self.Iq().setValues({'type': 'set'})
|
||||
iq['roster'] = {jid: {'name': name, 'subscription': subscription, 'groups': groups}}
|
||||
iq['roster']['items'] = {jid: {'name': name, 'subscription': subscription, 'groups': groups}}
|
||||
#self.send(iq, self.Iq().setValues({'id': iq['id']}))
|
||||
r = iq.send()
|
||||
return r['type'] == 'result'
|
||||
|
||||
def delRosterItem(self, jid):
|
||||
iq = self.Iq()
|
||||
iq['type'] = 'set'
|
||||
iq['roster']['items'] = {jid: {'subscription': 'remove'}}
|
||||
return iq.send()['type'] == 'result'
|
||||
|
||||
def getRoster(self):
|
||||
"""Request the roster be sent."""
|
||||
iq = self.Iq().setValues({'type': 'get'}).enable('roster').send()
|
||||
|
|
11
sleekxmpp/stanza/atom.py
Normal file
11
sleekxmpp/stanza/atom.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from .. xmlstream.stanzabase import ElementBase, ET, JID
|
||||
from xml.etree import cElementTree as ET
|
||||
|
||||
class AtomEntry(ElementBase):
|
||||
namespace = 'http://www.w3.org/2005/Atom'
|
||||
name = 'entry'
|
||||
plugin_attrib = 'entry'
|
||||
interfaces = set(('title', 'summary'))
|
||||
sub_interfaces = set(('title', 'summary'))
|
||||
plugin_attrib_map = {}
|
||||
plugin_tag_map = {}
|
Loading…
Reference in a new issue