Check presence for empty show node, assume as online
This commit is contained in:
parent
d3c6e5c62c
commit
ad16b18871
|
@ -57,7 +57,10 @@ public class Stanza : Xmpp.Stanza {
|
||||||
public string show {
|
public string show {
|
||||||
get {
|
get {
|
||||||
StanzaNode? show_node = stanza.get_subnode(NODE_SHOW);
|
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 {
|
set {
|
||||||
if (value != SHOW_ONLINE) {
|
if (value != SHOW_ONLINE) {
|
||||||
|
|
Loading…
Reference in a new issue