Software /
code /
prosody
Diff
plugins/muc/mod_muc.lua @ 9237:b86c2e135797
MUC: Add support for storing additional data with MUC affiliations
XEP-0045 registration provides examples of registering a nickname
and various other details. This also allows modules to store arbitrary
private data about an affiliated entity.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 03 Sep 2018 12:18:13 +0100 |
parent | 9221:6dc1aeefa876 |
child | 9240:f9a83aca4421 |
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua Sat Sep 01 00:45:51 2018 +0200 +++ b/plugins/muc/mod_muc.lua Mon Sep 03 12:18:13 2018 +0100 @@ -107,9 +107,9 @@ end local _set_affiliation = room_mt.set_affiliation; - function room_mt:set_affiliation(actor, jid, affiliation, reason) + function room_mt:set_affiliation(actor, jid, affiliation, reason, data) if affiliation ~= "owner" and is_admin(jid) then return nil, "modify", "not-acceptable"; end - return _set_affiliation(self, actor, jid, affiliation, reason); + return _set_affiliation(self, actor, jid, affiliation, reason, data); end end