add some if connection:
This commit is contained in:
parent
1149556e4b
commit
28b9a37333
|
@ -819,6 +819,7 @@ class Connection:
|
|||
if signed:
|
||||
p.setTag(common.xmpp.NS_SIGNED + ' x').setData(signed)
|
||||
|
||||
if self.connection:
|
||||
self.connection.send(p)
|
||||
self.dispatch('STATUS', show)
|
||||
#ask our VCard
|
||||
|
@ -835,6 +836,7 @@ class Connection:
|
|||
p = common.xmpp.Presence(typ = 'unavailable')
|
||||
if msg:
|
||||
p.setStatus(msg)
|
||||
if self.connection:
|
||||
self.connection.send(p)
|
||||
try:
|
||||
self.connection.disconnect()
|
||||
|
@ -853,6 +855,7 @@ class Connection:
|
|||
p.setStatus(msg)
|
||||
if signed:
|
||||
p.setTag(common.xmpp.NS_SIGNED + ' x').setData(signed)
|
||||
if connection:
|
||||
self.connection.send(p)
|
||||
self.dispatch('STATUS', show)
|
||||
|
||||
|
|
Loading…
Reference in New Issue