diff options
author | John Smith <mrdoctorwho@helldev.net> | 2019-01-03 13:38:01 +0300 |
---|---|---|
committer | John Smith <mrdoctorwho@helldev.net> | 2019-01-03 13:38:01 +0300 |
commit | 1c3332ead324e0c31513d56b9d17f53a60cddece (patch) | |
tree | baac169517191f773d3fa932fd5b2c56deb56efa | |
parent | 2b50dcd709656870e30825844792c421d3826aff (diff) |
essential fixes for groupchats
-rw-r--r-- | extensions/groupchats.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/groupchats.py b/extensions/groupchats.py index 1d86f9d..d359641 100644 --- a/extensions/groupchats.py +++ b/extensions/groupchats.py @@ -344,6 +344,7 @@ class Chat(object): """ A callback which called after attempt to create the chat """ + frm = stanza.getFrom() if not frm: logger.critical("no from in stanza! %s", stanza) return @@ -431,7 +432,12 @@ class Chat(object): Gets user object by chat jid """ user = None - creator, id, domain = Chat.getParts(source) + parts = Chat.getParts(source) + if len(parts) == 3: + creator, id, domain = parts + else: + logger.error("groupchats: we didn't get all parts! parts: %s. (jid: %s)", repr(parts), source) + return None if creator and domain == ConferenceServer: user = Chat.getUserByID(creator) if not user: |