add get_own_jid method to ConnectionZeroconf. Fixes #8809

This commit is contained in:
Yann Leboulanger 2017-12-18 14:44:38 +01:00
parent c18ef648e6
commit 53a92bdee8
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,8 @@ import socket
import random
random.seed()
import nbxmpp
import signal
if os.name != 'nt':
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
@ -122,6 +124,9 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
def check_jid(self, jid):
return jid
def get_own_jid(self):
return nbxmpp.JID(self.username + '@' + self.hostname)
def reconnect(self):
# Do not try to reco while we are already trying
self.time_to_reconnect = None