From ad8a81000e874dc3f20c8d97ef698604a67ead4b Mon Sep 17 00:00:00 2001 From: dequis Date: Tue, 27 Oct 2015 06:01:40 -0300 Subject: 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 --- protocols/jabber/message.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'protocols') 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: - * + * * - * */ + * + * + * 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); -- cgit v1.2.3