small cleanup
This commit is contained in:
parent
2c44dfa19d
commit
a581b8018d
|
@ -273,7 +273,7 @@ class Connection:
|
||||||
prio = 0
|
prio = 0
|
||||||
ptype = prs.getType()
|
ptype = prs.getType()
|
||||||
if ptype == 'available': ptype = None
|
if ptype == 'available': ptype = None
|
||||||
gajim.log.debug('PresenceCB : %s' % ptype)
|
gajim.log.debug('PresenceCB: %s' % ptype)
|
||||||
xtags = prs.getTags('x')
|
xtags = prs.getTags('x')
|
||||||
sigTag = None
|
sigTag = None
|
||||||
keyID = ''
|
keyID = ''
|
||||||
|
@ -314,7 +314,7 @@ class Connection:
|
||||||
jid.getResource().encode('utf8')))
|
jid.getResource().encode('utf8')))
|
||||||
self.dispatch('UPDUSER', (jid.getStripped().encode('utf8'),
|
self.dispatch('UPDUSER', (jid.getStripped().encode('utf8'),
|
||||||
jid.getNode(), [_('General')]))
|
jid.getNode(), [_('General')]))
|
||||||
#BE CAREFUL : no con.updateRosterItem() in a callback
|
#BE CAREFUL: no con.updateRosterItem() in a callback
|
||||||
gajim.log.debug('we are now subscribed to %s' % who)
|
gajim.log.debug('we are now subscribed to %s' % who)
|
||||||
elif ptype == 'unsubscribe':
|
elif ptype == 'unsubscribe':
|
||||||
gajim.log.debug('unsubscribe request from %s' % who)
|
gajim.log.debug('unsubscribe request from %s' % who)
|
||||||
|
@ -324,7 +324,7 @@ class Connection:
|
||||||
elif ptype == 'error':
|
elif ptype == 'error':
|
||||||
errmsg = prs.getError()
|
errmsg = prs.getError()
|
||||||
errcode = prs.getErrorCode()
|
errcode = prs.getErrorCode()
|
||||||
if errcode == '409': #conflict : Nick Conflict
|
if errcode == '409': #conflict: Nick Conflict
|
||||||
self.dispatch('ERROR', (errmsg, ''))
|
self.dispatch('ERROR', (errmsg, ''))
|
||||||
elif errcode == '502': # Internal Timeout:
|
elif errcode == '502': # Internal Timeout:
|
||||||
self.dispatch('NOTIFY', (prs.getFrom().getStripped().encode('utf8'),
|
self.dispatch('NOTIFY', (prs.getFrom().getStripped().encode('utf8'),
|
||||||
|
@ -555,7 +555,7 @@ class Connection:
|
||||||
if not self.connection:
|
if not self.connection:
|
||||||
return
|
return
|
||||||
roster = self.connection.getRoster().getRaw()
|
roster = self.connection.getRoster().getRaw()
|
||||||
if not roster :
|
if not roster:
|
||||||
roster = {}
|
roster = {}
|
||||||
else:
|
else:
|
||||||
for i in roster.keys():
|
for i in roster.keys():
|
||||||
|
@ -603,12 +603,6 @@ class Connection:
|
||||||
self.bookmarks.append(bm)
|
self.bookmarks.append(bm)
|
||||||
self.dispatch('BOOKMARKS', self.bookmarks)
|
self.dispatch('BOOKMARKS', self.bookmarks)
|
||||||
|
|
||||||
# if bm['autojoin'] == '1':
|
|
||||||
# jid = common.xmpp.protocol.JID(conf.getAttr('jid'))
|
|
||||||
# server = jid.getDomain()
|
|
||||||
# room = jid.getNode()
|
|
||||||
# gc = self.join_gc(bm['nick'], room, server, bm['password'])
|
|
||||||
|
|
||||||
elif ns == 'gajim:prefs':
|
elif ns == 'gajim:prefs':
|
||||||
#Preferences data
|
#Preferences data
|
||||||
#http://www.jabber.org/jeps/jep-0049.html
|
#http://www.jabber.org/jeps/jep-0049.html
|
||||||
|
|
Loading…
Reference in New Issue