[Link Mauve] fix for bookmarks(XEP-0048)
This commit is contained in:
parent
33b2ae1108
commit
8ed33a3227
|
@ -461,7 +461,13 @@ class PrivateStorageReceivedEvent(nec.NetworkIncomingEvent):
|
||||||
class BookmarksHelper:
|
class BookmarksHelper:
|
||||||
def parse_bookmarks(self):
|
def parse_bookmarks(self):
|
||||||
self.bookmarks = []
|
self.bookmarks = []
|
||||||
confs = self.base_event.storage_node.getTags('conference')
|
try:
|
||||||
|
storage = self.base_event.item_node.getTag('storage',
|
||||||
|
namespace=xmpp.NS_BOOKMARKS)
|
||||||
|
except AttributeError:
|
||||||
|
storage = self.base_event.storage_node
|
||||||
|
confs = storage.getTags('conference')
|
||||||
|
|
||||||
for conf in confs:
|
for conf in confs:
|
||||||
autojoin_val = conf.getAttr('autojoin')
|
autojoin_val = conf.getAttr('autojoin')
|
||||||
if autojoin_val is None: # not there (it's optional)
|
if autojoin_val is None: # not there (it's optional)
|
||||||
|
|
|
@ -38,6 +38,7 @@ NS_AUTH ='jabber:iq:auth'
|
||||||
NS_AVATAR ='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'
|
NS_AVATAR ='http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'
|
||||||
NS_BIND ='urn:ietf:params:xml:ns:xmpp-bind'
|
NS_BIND ='urn:ietf:params:xml:ns:xmpp-bind'
|
||||||
NS_BOB ='urn:xmpp:bob' #XEP-0231
|
NS_BOB ='urn:xmpp:bob' #XEP-0231
|
||||||
|
NS_BOOKMARKS ='storage:bookmarks' #XEP-0048
|
||||||
NS_BROWSE ='jabber:iq:browse'
|
NS_BROWSE ='jabber:iq:browse'
|
||||||
NS_BROWSING ='http://jabber.org/protocol/browsing' # XEP-0195
|
NS_BROWSING ='http://jabber.org/protocol/browsing' # XEP-0195
|
||||||
NS_BYTESTREAM ='http://jabber.org/protocol/bytestreams' # JEP-0065
|
NS_BYTESTREAM ='http://jabber.org/protocol/bytestreams' # JEP-0065
|
||||||
|
|
Loading…
Reference in New Issue