prevent duplicate bookmarks

This commit is contained in:
Yann Leboulanger 2010-07-30 15:16:09 +02:00
parent 3c2481fc2d
commit 84982aaf30
1 changed files with 2 additions and 1 deletions

View File

@ -1128,7 +1128,8 @@ ConnectionCaps, ConnectionHandlersBase, ConnectionJingle):
log.warn('Invalid JID: %s, ignoring it' % conf.getAttr('jid'))
continue
if bm not in self.bookmarks:
bm_jids = [b['jid'] for b in self.bookmarks]
if bm['jid'] not in bm_jids:
self.bookmarks.append(bm)
if storage_type == 'xml':
# We got a bookmark that was not in pubsub