From ca40405d2adc868ec1cdf9746e6b0580010e28f4 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 8 Nov 2012 21:04:07 +0000 Subject: [PATCH] Do not show chat state notifications when present --- src/jabber.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jabber.c b/src/jabber.c index 24dd2915..6c513f91 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -489,8 +489,14 @@ _chat_message_handler(xmpp_stanza_t * const stanza) chat_session_set_recipient_supports(short_from, recipient_supports); } + gboolean historic_notification = FALSE; + // determine if the notifications happened whilst offline + if (xmpp_stanza_get_child_by_name(stanza, "delay") != NULL) { + historic_notification = TRUE; + } + // deal with chat states if recipient supports them - if (recipient_supports) { + if (recipient_supports && !historic_notification) { if (xmpp_stanza_get_child_by_name(stanza, "composing") != NULL) { if (prefs_get_notify_typing() || prefs_get_intype()) { prof_handle_typing(short_from);