summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-04-24 20:28:58 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-04-24 20:28:58 +0100
commit946674f424776ebfd1c3b9df6519de44186487cb (patch)
tree1e4dabd212c32b78d1e0e905007daf86c37ae68d
parent72b355de8cc0d4f681f0f5b84e6c6fe9f3bedce7 (diff)
downloadslixmpp-946674f424776ebfd1c3b9df6519de44186487cb.tar.gz
slixmpp-946674f424776ebfd1c3b9df6519de44186487cb.tar.bz2
slixmpp-946674f424776ebfd1c3b9df6519de44186487cb.tar.xz
slixmpp-946674f424776ebfd1c3b9df6519de44186487cb.zip
xep_0045: Ensure <show/> value is valid.
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--slixmpp/plugins/xep_0045.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0045.py b/slixmpp/plugins/xep_0045.py
index 83521b01..30769b5c 100644
--- a/slixmpp/plugins/xep_0045.py
+++ b/slixmpp/plugins/xep_0045.py
@@ -162,7 +162,7 @@ class XEP_0045(BasePlugin):
return
self.xmpp.roster[pr['from']].ignore_updates = True
entry = pr['muc'].get_stanza_values()
- entry['show'] = pr['show']
+ entry['show'] = pr['show'] if pr['show'] in pr.showtypes else None
entry['status'] = pr['status']
entry['alt_nick'] = pr['nick']
if pr['type'] == 'unavailable':