From 76c85b4c79d533ca7a780df381ccda5b9ab2934c Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 19 Nov 2009 13:11:38 +0000 Subject: resource_select now defaults to activity instead of priority. Also, adding a activity_timeout setting. Now, messages to someone who hasn't spoken for a while will be sent to his/her bare JID, usually resulting in a broadcast. This should fix issues with messages sometimes arriving on someone's Crackberry/Android/etc instead of some place s/he's paying attention to. Last, the activity timer is only reset on incoming messages. --- protocols/jabber/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols/jabber/message.c') diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c index 6cb67d42..a226a225 100644 --- a/protocols/jabber/message.c +++ b/protocols/jabber/message.c @@ -70,7 +70,7 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data ) { if( bud ) { - bud->last_act = time( NULL ); + bud->last_msg = time( NULL ); from = bud->ext_jid ? : bud->bare_jid; } else -- cgit v1.2.3 From c4bc92a42001a05a36678ae14f610ff3857be465 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 29 Mar 2010 20:26:11 -0400 Subject: Suppress empty "Headline:" messages for certain new XMPP broadcast messages. --- protocols/jabber/message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/jabber/message.c') diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c index a226a225..e8161029 100644 --- a/protocols/jabber/message.c +++ b/protocols/jabber/message.c @@ -79,8 +79,8 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data ) if( type && strcmp( type, "headline" ) == 0 ) { - c = xt_find_node( node->children, "subject" ); - g_string_append_printf( fullmsg, "Headline: %s\n", c && c->text_len > 0 ? c->text : "" ); + if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 ) + g_string_append_printf( fullmsg, "Headline: %s\n", c->text ); /* http://.... can contain a URL, it seems. */ for( c = node->children; c; c = c->next ) -- cgit v1.2.3