aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2012-09-29 20:49:19 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2012-09-29 20:49:19 +0100
commit4c9d3777d99191786a449912989a66a44a038383 (patch)
treed95dc35cc74d67bda9201e51ffc8046e24f052cb
parent208db4babb7a9be245cedd3a0a4758891fece03d (diff)
Suppress own UBM messages.
-rw-r--r--protocols/msn/ns.c15
1 files changed, 13 insertions, 2 deletions
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;
}