Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-11-04 00:07:00 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-11-04 00:07:00 +0300
commita335c9ec46651e029703a97a3d5ec2d46f68a077 (patch)
tree71cf25620f79c9dc01d5ce7a49a0b202ef532c9d /nbxmpp/structs.py
parent05e74605cf99c5955b3e09bd2b2c51c071416952 (diff)
Revert "Refactor XHTML event code"
This reverts commit 05e74605cf99c5955b3e09bd2b2c51c071416952
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r--nbxmpp/structs.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py
index 4512704..77bf605 100644
--- a/nbxmpp/structs.py
+++ b/nbxmpp/structs.py
@@ -26,7 +26,6 @@ from nbxmpp.protocol import NS_MAM_2
from nbxmpp.protocol import NS_MUC
from nbxmpp.protocol import NS_MUC_INFO
from nbxmpp.protocol import NS_CLIENT
-from nbxmpp.protocol import NS_XHTML
from nbxmpp.protocol import Protocol
from nbxmpp.const import MessageType
from nbxmpp.const import AvatarState
@@ -832,26 +831,3 @@ class PresenceProperties:
return self.muc_user.role
except Exception:
return None
-
-
-class XHTMLData:
- def __init__(self, xhtml):
- self._bodys = {}
- for body in xhtml.getTags('body', namespace=NS_XHTML):
- lang = body.getXmlLang()
- self._bodys[lang] = body
-
- def get_body(self, pref_lang=None):
- if pref_lang is not None:
- body = self._bodys.get(pref_lang)
- if body is not None:
- return str(body)
-
- body = self._bodys.get('en')
- if body is not None:
- return str(body)
-
- body = self._bodys.get(None)
- if body is not None:
- return str(body)
- return str(self._bodys.popitem()[1])