Software /
code /
prosody-modules
Diff
mod_muc_search/mod_muc_search.lua @ 4137:5f4bcaad18ee
mod_muc_search: Some changes predating version control
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Aug 2018 11:16:46 +0200 |
parent | 4136:d2a9aa27169d |
line wrap: on
line diff
--- a/mod_muc_search/mod_muc_search.lua Fri Aug 17 09:49:27 2018 +0200 +++ b/mod_muc_search/mod_muc_search.lua Fri Aug 17 11:16:46 2018 +0200 @@ -1,8 +1,15 @@ +-- mod_muc_search +-- https://muclumbus.jabbercat.org/docs/api#xmpp +-- TODO +-- Result set management (pagination, limits) +-- Sorting +-- min_users + local dataforms = require "util.dataforms"; local st = require "util.stanza"; local mod_muc = module:depends("muc"); -assert(mod_muc.live_rooms, "Missing required MUC API. Prosody >= hg:f5c43e829d93 required") +assert(mod_muc.live_rooms, "Missing required MUC API. Prosody >= hg:f5c43e829d93 required"); local search_form = dataforms.new { { @@ -79,8 +86,7 @@ local result = st.reply(stanza) :tag("result", { xmlns = "https://xmlns.zombofant.net/muclumbus/search/1.0" }); - for room in mod_muc.live_rooms() do - + for room in mod_muc.live_rooms() do -- TODO s/live/all/ but preferably along with pagination/rsm if room:get_public() and not room:get_members_only() then module:log("debug", "Looking at room %s %q", room.jid, room._data); if (query.sinname and room:get_name():find(query.q, 1, true))