powered by Jive Software

Search on MUC service always empty

Hi,

I’m trying to do a search over MUC rooms from my JS-based client. I can succesfully ask openfire for a search form using this:

      <query xmlns="jabber:iq:search"></query>

The result I get is this:

Chat Rooms Search

Instructions

jabber:iq:search

So far so good. But when I make the actual search, all i get is an empty result. Always. Even when I see matching rooms from the admin console. My search IQ Stanza is:

<iq type=“set”

from=“admin@xmpp-pc/gxmpp”

to=“conference.xmpp-pc”

id=“search”

xml:lang=“en”

xmlns=“jabber:client”>

jabber:iq:search

10

Any ideas of what I’m doing wrong? or if I’m missing a setting or plugin? I’ve read some post of people talking about this funcionality and do returning results, so its surely something I’m doing wrong.

Thank you for any help!

Also if you have any idea on how I can debug the problem I would greatly apprecieate it. I am developing a plugin also, so I already have the source code…

Thanks!

OK!

Got down and dirty on the source code and found the problem. The code that handes the search request for rooms was working fine (although I think it will be rather slow with too many rooms) but the result set was not being added to the response!

Thats why I never saw any matches. I just added one line of code, recompiled and now it works. I’ll try and contact the authors so they can fix it, or I’ll try to commit it to the svn myself.

In case it is usefull to anyone, the line I added is

res.add(resultform.getElement());

On the line 340 of the file at src/java/org/jivesoftware/openfire/muc/spi/IQMUCSearchHandler.java.

I’ll let you know when/if this makes it to the svn

Filed OF-459, thanks