diff options
author | fiaxh <git@lightrise.org> | 2019-05-21 18:09:53 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-05-21 18:09:53 +0200 |
commit | ad16b188715f9612d4fb2b72690682f2b2eaaff2 (patch) | |
tree | ce49b200e91a464c4c8e5f9e8e1ec9f3d98820bf /xmpp-vala/src | |
parent | d3c6e5c62cb405cb6db646ee1ee03ca1e51d5e00 (diff) | |
download | dino-ad16b188715f9612d4fb2b72690682f2b2eaaff2.tar.gz dino-ad16b188715f9612d4fb2b72690682f2b2eaaff2.zip |
Check presence for empty show node, assume as online
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r-- | xmpp-vala/src/module/presence/stanza.vala | 5 |
1 files changed, 4 insertions, 1 deletions
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) { |