mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
jabber_mirror: Calculate the zulip domain from the client email address
We were previously calculating it from the zulip_email option, which might not be set if it is being specified via the config file. (imported from commit 76866c239ca63ef90a7967c9a6027aeec9be6390)
This commit is contained in:
@@ -389,10 +389,10 @@ option does not affect login credentials.'''.replace("\n", " "))
|
|||||||
sys.exit("You must specify your Jabber JID and Jabber password either "
|
sys.exit("You must specify your Jabber JID and Jabber password either "
|
||||||
+ "in the Zulip configuration file or on the commandline")
|
+ "in the Zulip configuration file or on the commandline")
|
||||||
|
|
||||||
# This won't work for open realms
|
|
||||||
options.zulip_domain = options.zulip_email.partition('@')[-1]
|
|
||||||
|
|
||||||
zulip = ZulipToJabberBot(zulip.init_from_options(options, "JabberMirror/" + __version__))
|
zulip = ZulipToJabberBot(zulip.init_from_options(options, "JabberMirror/" + __version__))
|
||||||
|
# This won't work for open realms that don't have a consistent domain
|
||||||
|
options.zulip_domain = zulip.client.email.partition('@')[-1]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
jid = JID(options.jid)
|
jid = JID(options.jid)
|
||||||
except InvalidJID as e:
|
except InvalidJID as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user