aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/stanza_error.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-08-14 20:22:52 +0200
committerfiaxh <git@lightrise.org>2021-08-17 22:32:33 +0200
commit447464f4d1ac0c184764f103ac9e51f7ff2dce91 (patch)
treedf4aab32001564c5aa706500ce6e7d68904e2d47 /xmpp-vala/src/module/stanza_error.vala
parentcf8501ba30e26bbc02b42204acf5cff650b338f4 (diff)
downloaddino-447464f4d1ac0c184764f103ac9e51f7ff2dce91.tar.gz
dino-447464f4d1ac0c184764f103ac9e51f7ff2dce91.zip
Display message delivery error, color text using theme colors
fixes #672
Diffstat (limited to 'xmpp-vala/src/module/stanza_error.vala')
-rw-r--r--xmpp-vala/src/module/stanza_error.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/stanza_error.vala b/xmpp-vala/src/module/stanza_error.vala
index a5c3956c..5e872291 100644
--- a/xmpp-vala/src/module/stanza_error.vala
+++ b/xmpp-vala/src/module/stanza_error.vala
@@ -60,8 +60,11 @@ namespace Xmpp {
public StanzaNode error_node;
- public ErrorStanza.from_stanza(StanzaNode stanza) {
- error_node = stanza.get_subnode("error");
+ public static ErrorStanza? from_stanza(StanzaNode stanza) {
+ var error_stanza = new ErrorStanza();
+ error_stanza.error_node = stanza.get_subnode("error");
+ if (error_stanza.error_node == null) return null;
+ return error_stanza;
}
public ErrorStanza.build(string type, string condition, string? human_readable, StanzaNode? application_condition) {