diff options
author | fiaxh <fiaxh@users.noreply.github.com> | 2019-06-21 19:49:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 19:49:17 +0200 |
commit | 23a298dc4b5645c12f2478d3d82bb20f38374c2c (patch) | |
tree | 812dd718bf4e2c9105c523e569b84fb83f37fe91 /xmpp-vala/src/module/iq/stanza.vala | |
parent | 34f9677c4e5384c9b823ce76c3dbeb143a3ff625 (diff) | |
parent | 57a7d165e91cbfa1b2b4c10e42958cdc0854e961 (diff) | |
download | dino-23a298dc4b5645c12f2478d3d82bb20f38374c2c.tar.gz dino-23a298dc4b5645c12f2478d3d82bb20f38374c2c.zip |
Merge pull request #579 from hrxi/pr_errors
Add a couple of error primitives for easier error handling
Diffstat (limited to 'xmpp-vala/src/module/iq/stanza.vala')
-rw-r--r-- | xmpp-vala/src/module/iq/stanza.vala | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xmpp-vala/src/module/iq/stanza.vala b/xmpp-vala/src/module/iq/stanza.vala index 3c938883..825d6a5d 100644 --- a/xmpp-vala/src/module/iq/stanza.vala +++ b/xmpp-vala/src/module/iq/stanza.vala @@ -30,17 +30,14 @@ public class Stanza : Xmpp.Stanza { public Stanza.set(StanzaNode stanza_node, string? id = null) { this(id); - type_ = TYPE_SET; + this.type_ = TYPE_SET; stanza.put_node(stanza_node); } - public Stanza.error(Stanza request, StanzaNode error_stanza, StanzaNode? associated_child = null) { + public Stanza.error(Stanza request, ErrorStanza error_stanza) { this(request.id); this.type_ = TYPE_ERROR; - stanza.put_node(error_stanza); - if (associated_child != null) { - stanza.put_node(associated_child); - } + stanza.put_node(error_stanza.error_node); } public Stanza.from_stanza(StanzaNode stanza_node, Jid? my_jid) { base.incoming(stanza_node, my_jid); |