diff options
-rw-r--r-- | nbxmpp/structs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py index 5f77de2..a673932 100644 --- a/nbxmpp/structs.py +++ b/nbxmpp/structs.py @@ -773,10 +773,18 @@ class CommonError: self.condition_data = self._error_node.getTagData(self.condition) self.app_condition = stanza.getAppError() self.type = stanza.getErrorType() + self.by = None self.jid = stanza.getFrom() self.id = stanza.getID() self._text = {} + by = self._error_node.getAttr('by') + if by is not None: + try: + self.by = JID.from_string(by) + except Exception: + pass + text_elements = self._error_node.getTags('text', namespace=Namespace.STANZAS) for element in text_elements: lang = element.getXmlLang() |