diff options
author | fiaxh <git@mx.ax.lt> | 2017-06-13 16:04:26 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-06-13 19:51:24 +0200 |
commit | dabc2a8b1d2a7bf2019e5f913c736d80f11ceb53 (patch) | |
tree | c767da379fa8b3da9c17446bfb64bbd945fb9305 /xmpp-vala/src/core | |
parent | e63d59eb3450471b33a22efda6df8871818209b1 (diff) | |
download | dino-dabc2a8b1d2a7bf2019e5f913c736d80f11ceb53.tar.gz dino-dabc2a8b1d2a7bf2019e5f913c736d80f11ceb53.zip |
MUC join behaviour + small MUC error changes
Diffstat (limited to 'xmpp-vala/src/core')
-rw-r--r-- | xmpp-vala/src/core/stanza_attribute.vala | 2 | ||||
-rw-r--r-- | xmpp-vala/src/core/stanza_node.vala | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/xmpp-vala/src/core/stanza_attribute.vala b/xmpp-vala/src/core/stanza_attribute.vala index 26e63f80..f751c801 100644 --- a/xmpp-vala/src/core/stanza_attribute.vala +++ b/xmpp-vala/src/core/stanza_attribute.vala @@ -32,7 +32,7 @@ public class StanzaAttribute : StanzaEntry { } } - public string to_string() { + public override string to_string(int i = 0) { return printf(ATTRIBUTE_STRING_FORMAT); } diff --git a/xmpp-vala/src/core/stanza_node.vala b/xmpp-vala/src/core/stanza_node.vala index 026b8ddb..67b8db35 100644 --- a/xmpp-vala/src/core/stanza_node.vala +++ b/xmpp-vala/src/core/stanza_node.vala @@ -42,6 +42,10 @@ public abstract class StanzaEntry { public virtual unowned string? get_string_content() { return val; } + + public virtual string to_string(int i = 0) { + return get_string_content() ?? "(null)"; + } } public class StanzaNode : StanzaEntry { @@ -339,7 +343,7 @@ public class StanzaNode : StanzaEntry { return sb.str; } - public string to_string(int i = 0) { + public override string to_string(int i = 0) { return printf(i, TAG_START_BEGIN_FORMAT, TAG_START_EMPTY_END, TAG_START_CONTENT_END, TAG_END_FORMAT, StanzaAttribute.ATTRIBUTE_STRING_FORMAT); } |