# HG changeset patch # User Mikael Berthe # Date 1157201686 -7200 # Node ID 819396bebdf5b5f2f90f00e880bc4628d9623624 # Parent 6be62425dc38956badeafba75292afb8bf029150 Do not block system messages when block_unsubscribed is set diff -r 6be62425dc38 -r 819396bebdf5 mcabber/src/jabglue.c --- a/mcabber/src/jabglue.c Sat Sep 02 14:54:12 2006 +0200 +++ b/mcabber/src/jabglue.c Sat Sep 02 14:54:46 2006 +0200 @@ -822,7 +822,7 @@ const char *enc, time_t timestamp) { char *jid; - const char *rname; + const char *rname, *s; jid = jidtodisp(from); @@ -864,9 +864,11 @@ // We don't call the message_in hook if 'block_unsubscribed' is true and // this is a regular message from an unsubscribed user. + // System messages (from our server) are allowed. if (!settings_opt_get_int("block_unsubscribed") || (roster_getsubscription(jid) & sub_from) || - (type && strcmp(type, "chat"))) { + (type && strcmp(type, "chat")) || + ((s = settings_opt_get("server")) != NULL && !strcasecmp(jid, s))) { hk_message_in(jid, rname, timestamp, body, type); } else { scr_LogPrint(LPRINT_LOGNORM, "Blocked a message from <%s>", jid);