1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Do not show chat state notifications when <delay/> present

This commit is contained in:
James Booth 2012-11-08 21:04:07 +00:00
parent 3dd1575549
commit ca40405d2a

View File

@ -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);