From 4c9d3777d99191786a449912989a66a44a038383 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 29 Sep 2012 20:49:19 +0100 Subject: Suppress own UBM messages. --- protocols/msn/ns.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 49ccc5de..d9a558f9 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -806,11 +806,22 @@ static int msn_ns_message( struct msn_handler_data *handler, char *msg, int msgl } else if( strcmp( cmd[0], "UBM" ) == 0 ) { - char *ct = get_rfc822_header( msg, "Content-Type", msglen ); - char *handle; + /* This one will give us msgs from federated networks. Technically + it should also get us offline messages, but I don't know how + I can signal MSN servers to use it. */ + char *ct, *handle; + if( strcmp( cmd[1], ic->acc->user ) == 0 ) + { + /* With MPOP, you'll get copies of your own msgs from other + sessions. Discard those at least for now. */ + return 1; + } + + ct = get_rfc822_header( msg, "Content-Type", msglen ); if( strncmp( ct, "text/plain", 10 ) != 0 ) { + /* Typing notification or something? */ g_free( ct ); return 1; } -- cgit v1.2.3