Skip to content
Snippets Groups Projects
Commit cb4e60c4 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Dont send invalid presence show value

parent e01e552f
No related branches found
No related tags found
No related merge requests found
......@@ -175,6 +175,10 @@ class Presence:
def get_presence(self, to=None, typ=None, priority=None,
show=None, status=None, nick=None, caps=True,
sign=None, idle_time=None):
if show not in ('chat', 'away', 'xa', 'dnd'):
# Gajim sometimes passes invalid show values here
# until this is fixed this is a workaround
show = None
presence = nbxmpp.Presence(to, typ, priority, show, status)
if nick is not None:
nick_tag = presence.setTag('nick', namespace=nbxmpp.NS_NICK)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment