MUC search: no need to first fetch the form
This commit is contained in:
parent
320f11f795
commit
d2b4f2e0f6
@ -8,20 +8,7 @@ Strophe.addNamespace('MUCSEARCH', 'https://xmlns.zombofant.net/muclumbus/search/
|
|||||||
const rooms_cache = {};
|
const rooms_cache = {};
|
||||||
|
|
||||||
async function searchRooms (query) {
|
async function searchRooms (query) {
|
||||||
let iq = $iq({
|
const 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({
|
|
||||||
'type': 'get',
|
'type': 'get',
|
||||||
'from': _converse.bare_jid,
|
'from': _converse.bare_jid,
|
||||||
'to': 'api@search.jabber.network'
|
'to': 'api@search.jabber.network'
|
||||||
|
Loading…
Reference in New Issue
Block a user