Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 10451:347d16d70280
MUC: Add missing reference to room (thanks buildbot) [luacheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 26 Nov 2019 00:09:51 +0100 |
| parents | 2e36a54906e4 |
| children | 0566b45da987 |
comparison
equal
deleted
inserted
replaced
| 10450:c1edeb9fe337 | 10451:347d16d70280 |
|---|---|
| 454 return true; | 454 return true; |
| 455 end | 455 end |
| 456 end, 2); | 456 end, 2); |
| 457 | 457 |
| 458 module:hook("muc-occupant-pre-change", function(event) | 458 module:hook("muc-occupant-pre-change", function(event) |
| 459 local room = event.room; | |
| 459 local nick = jid_resource(event.dest_occupant.nick); | 460 local nick = jid_resource(event.dest_occupant.nick); |
| 460 if not resourceprep(nick, true) then -- strict | 461 if not resourceprep(nick, true) then -- strict |
| 461 event.origin.send(st.error_reply(event.stanza, "modify", "jid-malformed", "Nickname must pass strict validation", room.jid)); | 462 event.origin.send(st.error_reply(event.stanza, "modify", "jid-malformed", "Nickname must pass strict validation", room.jid)); |
| 462 return true; | 463 return true; |
| 463 end | 464 end |
