From ad16b188715f9612d4fb2b72690682f2b2eaaff2 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 21 May 2019 18:09:53 +0200 Subject: Check presence for empty show node, assume as online --- xmpp-vala/src/module/presence/stanza.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmpp-vala/src/module/presence/stanza.vala b/xmpp-vala/src/module/presence/stanza.vala index a7bcbb56..78ec97e4 100644 --- a/xmpp-vala/src/module/presence/stanza.vala +++ b/xmpp-vala/src/module/presence/stanza.vala @@ -57,7 +57,10 @@ public class Stanza : Xmpp.Stanza { public string show { get { StanzaNode? show_node = stanza.get_subnode(NODE_SHOW); - return show_node != null ? show_node.get_string_content() : SHOW_ONLINE; + if (show_node == null) { + return SHOW_ONLINE; + } + return show_node.get_string_content() ?? SHOW_ONLINE; } set { if (value != SHOW_ONLINE) { -- cgit v1.2.3-70-g09d2