Dont send invalid presence show value
This commit is contained in:
parent
e01e552f65
commit
cb4e60c481
|
@ -175,6 +175,10 @@ class Presence:
|
||||||
def get_presence(self, to=None, typ=None, priority=None,
|
def get_presence(self, to=None, typ=None, priority=None,
|
||||||
show=None, status=None, nick=None, caps=True,
|
show=None, status=None, nick=None, caps=True,
|
||||||
sign=None, idle_time=None):
|
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)
|
presence = nbxmpp.Presence(to, typ, priority, show, status)
|
||||||
if nick is not None:
|
if nick is not None:
|
||||||
nick_tag = presence.setTag('nick', namespace=nbxmpp.NS_NICK)
|
nick_tag = presence.setTag('nick', namespace=nbxmpp.NS_NICK)
|
||||||
|
|
Loading…
Reference in New Issue