Opened 5 years ago

Last modified 5 years ago

#16233 new defect

Custom emoticons don't show in XMPP under certain conditions

Reported by: jvisc Owned by: deryni
Milestone: Component: XMPP
Version: 2.10.9 Keywords: emoticons,xmpp,pidgin
Cc:

Description

This occurs in XMPP group chat if a user with a different client joins (For example, Xabber).

When this happens, the emoticon appears for the sender but no one else, not even other Pidgin clients who should normally be able to receive it. Thus, one bad user joining the chatroom blocks custom emoticons for everyone.

An IQ BOB request is never received by the emoticon sender (normally I get one IQ request for each user).

I have determined the cause to be something to do with the client not sending the following packets upon joining the room:

<c hash='sha-1' ver='I22W7CegORwdbnu0ZiQwGpxr0Go=' node='http://pidgin.im/' xmlns='http://jabber.org/protocol/caps'/>

<iq type='get' id='purple9e10147b' to='myroom@myserver.com'><query xmlns='http://jabber.org/protocol/disco#info' node='http://jabber.org/protocol/muc#traffic'/></iq>

I added this fix to my custom chatbot, and custom emoticons started working again. Both packets are required, and if any client doesn't send these packets, custom emoticons are blocked for everyone.

Fixing this would be great because we use custom emoticons a lot, and it is a shame to have them blocked when an Android(Xabber) user joins.

Change History (2)

comment:1 Changed 5 years ago by datallah

  • Component changed from pidgin (gtk) to XMPP
  • Owner set to deryni

comment:2 Changed 5 years ago by jvisc

The issue is the following logic found in libpurple/protocols/jabber/message.c

chat = jabber_chat_find_by_conv(PURPLE_CHAT_CONVERSATION(conv));
if (chat) {
	/* do not attempt to send custom smileys in a MUC with more than
	 10 people, to avoid getting too many BoB requests */
	return jabber_chat_get_num_participants(chat) <= 10 &&
		jabber_chat_all_participants_have_capability(chat,
			NS_BOB);

} else {
	return FALSE;
}

The logic seems flawed - why should a single user joining a chatroom disable emoticons for everyone else? Their client should simply ignore the emoticon content and not ask for BOB data.

Limiting it to the number of users in a chatroom seems somewhat more logical, but that should be noted somewhere!!!

The fix is simple:

chat = jabber_chat_find_by_conv(PURPLE_CHAT_CONVERSATION(conv));
if (chat) {
	return TRUE; /* Always send emoticon content, even if clients don't support it */
} else {
	return FALSE;
}
Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!