Timestamp:
2015-10-21T06:24:08Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
72d661e
Parents:
0c78bb7
Message:

jabber: Fix XEP85 detection (typing) between two bitlbee users

Fixes trac ticket 1143: https://bugs.bitlbee.org/bitlbee/ticket/1143

The "correct" way to discover XEP85 support is to send a discovery
query. We take a more conservative approach: if the irc client claims to
support typing (by sending CTCP TYPING at least once), we send an
<active> tag along with next chat message, and set JBFLAG_PROBED_XEP85.
The logic for that stuff is in jabber_buddy_msg().

That's all neat and clever and actually works fine. What was broken was
the detection side. Whenever a <composing>, <active> or <pause> is
received, the buddy is marked as supporting XEP85. However the <active>
tag had an additional check:

/* No need to send a "stopped typing" signal when there's a message. */
else if (xt_find_node(node->children, "active") && (body == NULL)) {

It skipped the tag completely if it had a message too.

This was changed to move the body == NULL condition inside, so that the
flag is set.

Took me longer to write this message than the diff itself. But even
longer to actually decide to debug this behavior. I'm the one who
submitted that ticket, one year and a half ago. Yep.

(No files)

Note: See TracChangeset for help on using the changeset viewer.