Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 9052:5017e43ccc39
MUC: Add 'actor' field in muc-config-submitted event
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 17 Jul 2018 11:54:02 +0100 |
parent | 9027:4028eb4a9f7f |
child | 9054:0bf0ff3b0f91 |
comparison
equal
deleted
inserted
replaced
9051:68386f7b9fc9 | 9052:5017e43ccc39 |
---|---|
799 origin.send(st.error_reply(stanza, "cancel", "bad-request", "Form is not of type room configuration")); | 799 origin.send(st.error_reply(stanza, "cancel", "bad-request", "Form is not of type room configuration")); |
800 return true; | 800 return true; |
801 end | 801 end |
802 end | 802 end |
803 | 803 |
804 local event = {room = self; origin = origin; stanza = stanza; fields = fields; status_codes = {};}; | 804 local event = { |
805 room = self; | |
806 origin = origin; | |
807 stanza = stanza; | |
808 fields = fields; | |
809 status_codes = {}; | |
810 actor = stanza.attr.from; | |
811 }; | |
805 function event.update_option(name, field, allowed) | 812 function event.update_option(name, field, allowed) |
806 local new = fields[field]; | 813 local new = fields[field]; |
807 if new == nil then return; end | 814 if new == nil then return; end |
808 if allowed and not allowed[new] then return; end | 815 if allowed and not allowed[new] then return; end |
809 if new == self["get_"..name](self) then return; end | 816 if new == self["get_"..name](self) then return; end |