From 3b3c9bf4d5e46da4c3751809a4e724870ea38a02 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 30 Oct 2020 15:09:40 +0100 Subject: Print all error stanzas Regards https://github.com/profanity-im/profanity/issues/1435 So far we didn't print the error if it contained ``. It appears that the code always thought this is a service-not-available (so one is either blocked or the account doesn't exist) and printed `Recipient not found`. But there can be other errors as well. Like in above mentioned issue `not-allowed`. Let's just print the text. In case of the cancel type we still remove the jid from the chat sessions. I'm not entirely sure whether this needs to be done in other cases too. --- src/xmpp/message.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/xmpp') diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 8e13039c..4bbddc72 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -824,12 +824,12 @@ _handle_error(xmpp_stanza_t* const stanza) if (!jid) { ui_handle_error(err_msg); - } else if (type && (strcmp(type, "cancel") == 0)) { - log_info("Recipient %s not found: %s", jid, err_msg); - Jid* jidp = jid_create(jid); - chat_session_remove(jidp->barejid); - jid_destroy(jidp); } else { + if (type && (strcmp(type, "cancel") == 0)) { + Jid* jidp = jid_create(jid); + chat_session_remove(jidp->barejid); + jid_destroy(jidp); + } ui_handle_recipient_error(jid, err_msg); } -- cgit 1.4.1-2-gfad0