Commit 6d9d8f72 authored by Philipp Hörist's avatar Philipp Hörist

Dont allow setting invalid show values

parent fe2e49d2
...@@ -1261,6 +1261,8 @@ class Presence(Protocol): ...@@ -1261,6 +1261,8 @@ class Presence(Protocol):
""" """
Set the show value of the message Set the show value of the message
""" """
if val not in ['away', 'chat', 'dnd', 'xa']:
raise ValueError('Invalid show value: %s' % val)
self.setTagData('show', val) self.setTagData('show', val)
def setStatus(self, val): def setStatus(self, val):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment