Changeset ad8a810 for protocols/jabber


Ignore:
Timestamp:
2015-10-30T10:31:09Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
2e99039
Parents:
129e282
git-author:
dequis <dx@…> (27-10-15 09:01:40)
git-committer:
dequis <dx@…> (30-10-15 10:31:09)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/message.c

    r129e282 rad8a810  
    3737        if (!from) {
    3838                return XT_HANDLED; /* Consider this packet corrupted. */
     39        }
    3940
    40         }
    41         if (request && id) {
     41        if (request && id && g_strcmp0(type, "groupchat") != 0) {
    4242                /* Send a message receipt (XEP-0184), looking like this:
    43                  * <message
    44                  *  from='kingrichard@royalty.england.lit/throne'
    45                  *  id='bi29sg183b4v'
    46                  *  to='northumberland@shakespeare.lit/westminster'>
     43                 * <message from='...' id='...' to='...'>
    4744                 *  <received xmlns='urn:xmpp:receipts' id='richard2-4.1.247'/>
    48                  * </message> */
     45                 * </message>
     46                 *
     47                 * MUC messages are excluded, since receipts aren't supposed to be sent over MUCs
     48                 * (XEP-0184 section 5.3) and replying to those may result in 'forbidden' errors.
     49                 */
    4950                struct xt_node *received, *receipt;
    5051
Note: See TracChangeset for help on using the changeset viewer.