Commit 6d9d8f72 authored by lovetox's avatar lovetox
Browse files

Dont allow setting invalid show values

parent fe2e49d2
Loading
Loading
Loading
Loading
+2 −0
Changes for nbxmpp/protocol.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1261,6 +1261,8 @@ class Presence(Protocol):
        """
        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)

    def setStatus(self, val):