From 447464f4d1ac0c184764f103ac9e51f7ff2dce91 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 14 Aug 2021 20:22:52 +0200 Subject: Display message delivery error, color text using theme colors fixes #672 --- xmpp-vala/src/module/message/module.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xmpp-vala/src/module/message') diff --git a/xmpp-vala/src/module/message/module.vala b/xmpp-vala/src/module/message/module.vala index 5f7d40f0..2eced5c1 100644 --- a/xmpp-vala/src/module/message/module.vala +++ b/xmpp-vala/src/module/message/module.vala @@ -12,6 +12,7 @@ namespace Xmpp { public StanzaListenerHolder send_pipeline = new StanzaListenerHolder(); public signal void received_message(XmppStream stream, MessageStanza message); + public signal void received_error(XmppStream stream, MessageStanza message, ErrorStanza error); public signal void received_message_unprocessed(XmppStream stream, MessageStanza message); public async void send_message(XmppStream stream, MessageStanza message) throws IOStreamError { @@ -24,7 +25,11 @@ namespace Xmpp { received_message_unprocessed(stream, message); - if (!message.is_error()) { + if (message.is_error()) { + ErrorStanza? error_stanza = message.get_error(); + if (error_stanza == null) return; + received_error(stream, message, error_stanza); + } else { bool abort = yield received_pipeline.run(stream, message); if (abort) return; -- cgit v1.2.3-70-g09d2