I want to use the mod_muc_size.lua file to get participants


#1

I want to use the mod_muc_size.lua file to get participants in each room.
But I tried to put the file into the module of prosody and it worked, but it did not work.

If you know of other ways to get participants, let me know.

If mod_muc_size.lua needs to be modified, how do I fix it?
Please let me know if you have an example.


#2

Have you check the logs for errors when loading prosody? You don’t need just that file, there are multiple imports and other files it depends on.
You don’t need to copy the file. You can easily add plugins_path to prosody like this:


#3

/usr/bin/prosody:168: module ‘util.async’ not found:
no field package.preload[‘util.async’]
no file ‘/usr/lib/prosody/util/async.lua’
no file ‘/usr/local/share/lua/5.1/util/async.lua’
no file ‘/usr/local/share/lua/5.1/util/async/init.lua’
no file ‘/usr/local/lib/lua/5.1/util/async.lua’
no file ‘/usr/local/lib/lua/5.1/util/async/init.lua’
no file ‘/usr/share/lua/5.1/util/async.lua’
no file ‘/usr/share/lua/5.1/util/async/init.lua’
no file ‘/usr/lib/prosody/util/async.so’
no file ‘/usr/local/lib/lua/5.1/util/async.so’
no file ‘/usr/lib/x86_64-linux-gnu/lua/5.1/util/async.so’
no file ‘/usr/lib/lua/5.1/util/async.so’
no file ‘/usr/local/lib/lua/5.1/loadall.so’
no file ‘/usr/lib/prosody/util.so’
no file ‘/usr/local/lib/lua/5.1/util.so’
no file ‘/usr/lib/x86_64-linux-gnu/lua/5.1/util.so’
no file ‘/usr/lib/lua/5.1/util.so’
no file ‘/usr/local/lib/lua/5.1/loadall.so’
stack traceback:
/usr/lib/prosody/core/modulemanager.lua:29: in function </usr/lib/prosody/core/modulemanager.lua:29>
[C]: in function ‘_real_require’
/usr/bin/prosody:168: in function ‘require’
…re/jitsi-meet/resources/prosody-plugins/util.lib.lua:2: in main chunk
(tail call): ?
…itsi-meet/resources/prosody-plugins/mod_muc_size.lua:10: in main chunk
(tail call): ?
[C]: in function ‘xpcall’
/usr/lib/prosody/core/modulemanager.lua:29: in function ‘pcall’
/usr/lib/prosody/core/modulemanager.lua:171: in function ‘do_load_module’
/usr/lib/prosody/core/modulemanager.lua:249: in function ‘load’
/usr/lib/prosody/core/modulemanager.lua:74: in function ‘?’
/usr/lib/prosody/util/events.lua:67: in function ‘fire_event’
/usr/lib/prosody/core/hostmanager.lua:98: in function ‘activate’
/usr/lib/prosody/core/hostmanager.lua:44: in function ‘?’
/usr/lib/prosody/util/events.lua:67: in function ‘fire_event’
/usr/bin/prosody:337: in function ‘prepare_to_start’
/usr/bin/prosody:403: in main chunk

plugin_paths = {"/ usr / share / jitsi-meet / resources / prosody-plugins /"}
I have specified the above.

I added “muc_size” to module_enabled in the cfg.lua file in prosody
It did not find util.async.

I did not find a solution to find a way to go.


#4

Can you give more details, as operating system version and prosody version you use?
We are developing, testing and using those modules with prosody trunk.
The prosody modules are currently installed when installing the debian package jitsi-meet-tokens, and in there the dependency is prosody-trunk (>= 1nightly607). Apparently that util.async lib is missing for earlier versions of prosody.