diff options
Diffstat (limited to 'xmpp-vala')
-rw-r--r-- | xmpp-vala/src/module/message/stanza.vala | 7 | ||||
-rw-r--r-- | xmpp-vala/src/module/presence/stanza.vala | 4 | ||||
-rw-r--r-- | xmpp-vala/src/module/stanza.vala | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/xmpp-vala/src/module/message/stanza.vala b/xmpp-vala/src/module/message/stanza.vala index 8a9064a5..2b60c517 100644 --- a/xmpp-vala/src/module/message/stanza.vala +++ b/xmpp-vala/src/module/message/stanza.vala @@ -33,6 +33,13 @@ public class Stanza : Xmpp.Stanza { } } + public override string? type_ { + get { + return base.type_ ?? TYPE_NORMAL; + } + set { base.type_ = value; } + } + public Stanza(string? id = null) { base.outgoing(new StanzaNode.build("message")); stanza.set_attribute(ATTRIBUTE_ID, id ?? random_uuid()); diff --git a/xmpp-vala/src/module/presence/stanza.vala b/xmpp-vala/src/module/presence/stanza.vala index 9ad8f791..0926555e 100644 --- a/xmpp-vala/src/module/presence/stanza.vala +++ b/xmpp-vala/src/module/presence/stanza.vala @@ -73,9 +73,9 @@ public class Stanza : Xmpp.Stanza { } } - public override string type_ { + public override string? type_ { get { - return base.type_ != null ? base.type_ : TYPE_AVAILABLE; + return base.type_ ?? TYPE_AVAILABLE; } set { base.type_ = value; } } diff --git a/xmpp-vala/src/module/stanza.vala b/xmpp-vala/src/module/stanza.vala index f6af9623..85cbadb7 100644 --- a/xmpp-vala/src/module/stanza.vala +++ b/xmpp-vala/src/module/stanza.vala @@ -43,7 +43,7 @@ namespace Xmpp { set { stanza.set_attribute(ATTRIBUTE_TO, value); } } - public virtual string type_ { + public virtual string? type_ { get { return stanza.get_attribute(ATTRIBUTE_TYPE); } set { stanza.set_attribute(ATTRIBUTE_TYPE, value); } } |