Error when adding a hat using gajim

4 views
Skip to first unread message

Aidan Epstein

unread,
Sep 28, 2024, 4:09:48 PM9/28/24
to proso...@googlegroups.com

It looks like the prosody issue tracker is currently unable to send confirmation emails so I'm sending this here:

What steps will reproduce the problem?
1. Enable the hats module on the muc component
2. Add a hat using the ad-hoc command in gajim
3. See error

What is the expected output?
No errors and hat appears

What do you see instead?
```
prosody[1431]: c2s5f0ad8459c70: Traceback[c2s]: /usr/lib/prosody/modules/muc/hats.lib.lua:31: attempt to index a nil value (local 'legacy_hats_el')
                       stack traceback:
                       /usr/lib/prosody/modules/muc/hats.lib.lua:31: in field '?'
                       /usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77>
                       (...tail calls...)
                       /usr/lib/prosody/modules/muc/muc.lib.lua:241: in method 'publicise_occupant_status'
                       /usr/lib/prosody/modules/muc/muc.lib.lua:1507: in method 'set_affiliation'
                       ...ib/prosody/modules/mod_muc_hats_api/mod_muc_hats_api.lua:25: in field 'add_user_hat'
                       ...rosody/modules/mod_muc_hats_adhoc/mod_muc_hats_adhoc.lua:31: in function <...rosody/modules/mod_muc_hats_adhoc/mod_muc_hats_adhoc.lua:26>
                       (...tail calls...)
                       /usr/lib/prosody/modules/adhoc/adhoc.lib.lua:51: in upvalue 'adhoc_handle_cmd'
                       /usr/lib/prosody/modules/adhoc/mod_adhoc.lua:72: in field '?'
                       /usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77>
                       (...tail calls...)
                       /usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77>
                       (...tail calls...)
                       /usr/lib/prosody/core/stanza_router.lua:188: in upvalue 'core_post_stanza'
                       /usr/lib/prosody/core/stanza_router.lua:128: in upvalue 'core_process_stanza'
                       /usr/lib/prosody/modules/mod_c2s.lua:355: in upvalue 'func'
                       /usr/lib/prosody/util/async.lua:149: in function </usr/lib/prosody/util/async.lua:147>
```
I think this also prevents people from joining.

What version of the product are you using? On what operating system?
prosody-hg: r13522+.ccd6199cc6a2+-1
Arch Linux

Please provide any additional information below:
It looks like this was last changed here: https://hg.prosody.im/trunk/rev/f9171624fd03 .  Should line 1.16 read `legacy_hats_el` or something?  Right now it looks like I'm hitting a circumstance where `legacy_hats_el` does not get set, so the `legacy_hats_el:tag` call errors.

I'm very unfamiliar with the MUC hats code, but attached is a patch that may properly fix the issue.

muc_hats.patch

Kim Alvefur

unread,
Sep 28, 2024, 6:26:00 PM9/28/24
to proso...@googlegroups.com
On Sat, Sep 28, 2024 at 12:48:11PM -0700, Aidan Epstein wrote:
># HG changeset patch

Thanks, applied. Looks like an oversight from https://hg.prosody.im/trunk/rev/f9171624fd03

--
Kim "Zash" Alvefur
Prosody Developer
Reply all
Reply to author
Forward
0 new messages