powered by Jive Software

Can''t broadcast to groups with capital letters in name?

I’‘m trying to use the broadcast plugin, and it appears that I can’'t send broadcasts to groups that have capital letters in their names. The “to” value that the plugin gets from the Message is always in all lower case, even if it originally had capital letters in it when composed and sent to the server by the client. So when the plugin passes the “to” to the GroupManager the group is not found since the case of the “to” does not match the case of the group name. Do I just have to use all lower case group names, or is there some other fix/workaround for this? Is this documented somewhere and I just overlooked it?

Sam,

What database are you using? It might be that your database is doing case-sensitive lookups. For now, I’'d recommend using lower-case group names.

Regards,

Matt

Hi Matt!

I’‘m using Oracle 9i. I’'ll look into whether some problem is happening with the query in the database. I was just thinking that something might be happening in Messenger with the case of the “to” address because of the error that I get from the broadcast plugin. If try to I send a broadcast to “EXAMPLE@broadcast.myserver”, for example, the error returned by the broadcast plugin is “Address not valid: example@broadcast.myserver”. It seems like the case of the “to” address has already been changed to all lower case before this line of BroadcastPlugin.processPacket():


 if (packet instanceof Message) {
 Message message = (Message)packet;
 ****

String toNode = message.getTo().getNode();

All JID’'s must be lower case according to the XMPP spec. So, by the time the JID arrives to the broadcast plugin, it will indeed be lower case.

Regards,

Matt

Ah, OK. I figured it was probably something like that that I overlooked. It would be great for forgetful/etc. people like me if the Broadcast plugin doc had some text in it like “NOTE: group names must be all lower case if they are to be used in valid JIDs” since previously there wasn’'t really any reason to think about the case of group names. Anyway, thanks for the help!