MUC search: no need to first fetch the form

This commit is contained in:
JC Brand 2022-06-12 09:59:50 +02:00
parent 320f11f795
commit d2b4f2e0f6
1 changed files with 1 additions and 14 deletions

View File

@ -8,20 +8,7 @@ Strophe.addNamespace('MUCSEARCH', 'https://xmlns.zombofant.net/muclumbus/search/
const rooms_cache = {};
async function searchRooms (query) {
let iq = $iq({
'type': 'get',
'from': _converse.bare_jid,
'to': 'api@search.jabber.network'
}).c('search', { 'xmlns': Strophe.NS.MUCSEARCH })
try {
await api.sendIQ(iq);
} catch (e) {
log.error(e);
return [];
}
iq = $iq({
const iq = $iq({
'type': 'get',
'from': _converse.bare_jid,
'to': 'api@search.jabber.network'