diff options
| author | dequis <dx@dxzone.com.ar> | 2015-10-27 06:01:40 -0300 | 
|---|---|---|
| committer | dequis <dx@dxzone.com.ar> | 2015-10-30 07:31:09 -0300 | 
| commit | ad8a81000e874dc3f20c8d97ef698604a67ead4b (patch) | |
| tree | 4813c2f4341ab982dde98d02450816770959e57c /protocols | |
| parent | 129e2825aa6d5e1d34c58cec57a0db312ccc6b87 (diff) | |
jabber: Don't reply XEP-0184 receipts sent over MUCs
XEP-0184 section 5.3 says those shouldn't be sent over MUCs, but some
misbehaving clients do anyway, resulting in 'forbidden' errors
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/jabber/message.c | 15 | 
1 files changed, 8 insertions, 7 deletions
diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c index 7c40f3e0..94ef8014 100644 --- a/protocols/jabber/message.c +++ b/protocols/jabber/message.c @@ -36,16 +36,17 @@ xt_status jabber_pkt_message(struct xt_node *node, gpointer data)  	if (!from) {  		return XT_HANDLED; /* Consider this packet corrupted. */ -  	} -	if (request && id) { + +	if (request && id && g_strcmp0(type, "groupchat") != 0) {  		/* Send a message receipt (XEP-0184), looking like this: -		 * <message -		 *  from='kingrichard@royalty.england.lit/throne' -		 *  id='bi29sg183b4v' -		 *  to='northumberland@shakespeare.lit/westminster'> +		 * <message from='...' id='...' to='...'>  		 *  <received xmlns='urn:xmpp:receipts' id='richard2-4.1.247'/> -		 * </message> */ +		 * </message> +		 * +		 * MUC messages are excluded, since receipts aren't supposed to be sent over MUCs +		 * (XEP-0184 section 5.3) and replying to those may result in 'forbidden' errors. +		 */  		struct xt_node *received, *receipt;  		received = xt_new_node("received", NULL, NULL);  | 
