Software /
code /
prosody
Comparison
plugins/muc/util.lib.lua @ 9599:5a2135964ed3 0.11
MUC: Announce affiliation changes for JIDs that are not in the room
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 31 Oct 2018 13:13:05 +0000 |
parent | 6271:006b0e0f0de2 |
child | 9603:4897bd63f624 |
comparison
equal
deleted
inserted
replaced
9597:17d43543f9b6 | 9599:5a2135964ed3 |
---|---|
53 end | 53 end |
54 function _M.filter_muc_x(stanza) | 54 function _M.filter_muc_x(stanza) |
55 return stanza:maptags(muc_x_filter); | 55 return stanza:maptags(muc_x_filter); |
56 end | 56 end |
57 | 57 |
58 function _M.only_with_min_role(role) | |
59 local min_role_value = _M.valid_roles[role]; | |
60 return function (nick, occupant) | |
61 if _M.valid_roles[occupant.role or "none"] >= min_role_value then | |
62 return true; | |
63 end | |
64 end; | |
65 end | |
66 | |
58 return _M; | 67 return _M; |