From 492efc432cd37afcb5449d76b51fd865dac93ec5 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 11 Aug 2023 15:56:26 +0200 Subject: [PATCH] Display headline sender --- src/xmpp/message.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xmpp/message.c b/src/xmpp/message.c index f3852819..ad9f545e 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -118,7 +118,10 @@ _handle_headline(xmpp_stanza_t* const stanza) if (body) { char* text = xmpp_stanza_get_text(body); if (text) { - cons_show("Headline: %s", text); + const char* const stanza_from = xmpp_stanza_get_from(stanza); + if (stanza_from) { + cons_show("Headline from %s: %s", stanza_from, text); + } xmpp_free(connection_get_ctx(), text); } }