Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp.c @ 1895:7043542b3565
Do not block MUC private messages when 'block_unsubscribed' is set
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 11 Apr 2010 20:02:16 +0200 |
parents | fe385f2cfb93 |
children | c5ab9cf3819a |
comparison
equal
deleted
inserted
replaced
1894:c3271ac96173 | 1895:7043542b3565 |
---|---|
1151 | 1151 |
1152 // We don't call the message_in hook if 'block_unsubscribed' is true and | 1152 // We don't call the message_in hook if 'block_unsubscribed' is true and |
1153 // this is a regular message from an unsubscribed user. | 1153 // this is a regular message from an unsubscribed user. |
1154 // System messages (from our server) are allowed. | 1154 // System messages (from our server) are allowed. |
1155 if (settings_opt_get_int("block_unsubscribed") && | 1155 if (settings_opt_get_int("block_unsubscribed") && |
1156 (roster_gettype(bjid) != ROSTER_TYPE_ROOM) && | |
1156 !(roster_getsubscription(bjid) & sub_from) && | 1157 !(roster_getsubscription(bjid) & sub_from) && |
1157 (type != LM_MESSAGE_SUB_TYPE_GROUPCHAT)) { | 1158 (type != LM_MESSAGE_SUB_TYPE_GROUPCHAT)) { |
1158 char *sbjid = jidtodisp(lm_connection_get_jid(lconnection)); | 1159 char *sbjid = jidtodisp(lm_connection_get_jid(lconnection)); |
1159 const char *server = strchr(sbjid, JID_DOMAIN_SEPARATOR); | 1160 const char *server = strchr(sbjid, JID_DOMAIN_SEPARATOR); |
1160 if (g_strcmp0(server, bjid)) { | 1161 if (g_strcmp0(server, bjid)) { |