Changeset 0c78bb7


Ignore:
Timestamp:
2015-10-21T06:05:17Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
5307e88
Parents:
e4145d9
Message:

jabber: Fix outgoing google talk typing notifications

Since bare JIDs from typing notifications are now accepted, the other
buddy objects never get the flag JBFLAG_DOES_XEP85 set. This fixes it by
checking both the buddy with resource and the bare one, with the
implication that if the bare JID has that flag, all other resources get
typing notifications.

Follow up to the previous commit, splitting since they are actually
unrelated fixes, although this one is a consequence of the previous one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    re4145d9 r0c78bb7  
    592592{
    593593        struct jabber_data *jd = ic->proto_data;
    594         struct jabber_buddy *bud;
     594        struct jabber_buddy *bud, *bare;
    595595
    596596        /* Enable typing notification related code from now. */
    597597        jd->flags |= JFLAG_WANT_TYPING;
    598598
    599         if ((bud = jabber_buddy_by_jid(ic, who, 0)) == NULL) {
     599        if ((bud = jabber_buddy_by_jid(ic, who, 0)) == NULL ||
     600            (bare = jabber_buddy_by_jid(ic, who, GET_BUDDY_BARE)) == NULL) {
    600601                /* Sending typing notifications to unknown buddies is
    601602                   unsupported for now. Shouldn't be a problem, I think. */
     
    603604        }
    604605
    605         if (bud->flags & JBFLAG_DOES_XEP85) {
     606
     607        if (bud->flags & JBFLAG_DOES_XEP85 || bare->flags & JBFLAG_DOES_XEP85) {
    606608                /* We're only allowed to send this stuff if we know the other
    607                    side supports it. */
     609                   side supports it. If the bare JID has the flag, all other
     610                   resources get it, too (That is the case in gtalk) */
    608611
    609612                struct xt_node *node;
Note: See TracChangeset for help on using the changeset viewer.