summaryrefslogtreecommitdiff
path: root/slixmpp/stanza/presence.py
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/stanza/presence.py')
-rw-r--r--slixmpp/stanza/presence.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/slixmpp/stanza/presence.py b/slixmpp/stanza/presence.py
index 614cd331..7e59e1c5 100644
--- a/slixmpp/stanza/presence.py
+++ b/slixmpp/stanza/presence.py
@@ -90,10 +90,10 @@ class Presence(RootStanza):
def get_type(self):
"""
Return the value of the <presence> stanza's type attribute, or
- the value of the <show> element.
+ the value of the <show> element if valid.
"""
out = self._get_attr('type')
- if not out:
+ if not out and self['show'] in self.showtypes:
out = self['show']
if not out or out is None:
out = 'available'