comparison plugins/muc/subject.lib.lua @ 6991:84e01dbb739e

MUC: Update all config form handlers to take advantage of the new per-option events
author Matthew Wild <mwild1@gmail.com>
date Fri, 11 Dec 2015 15:33:58 +0000
parents 675aea867574
children 50b24b3476e6
comparison
equal deleted inserted replaced
6990:f476e2497568 6991:84e01dbb739e
36 label = "Allow Occupants to Change Subject?"; 36 label = "Allow Occupants to Change Subject?";
37 value = get_changesubject(event.room); 37 value = get_changesubject(event.room);
38 }); 38 });
39 end); 39 end);
40 40
41 module:hook("muc-config-submitted", function(event) 41 module:hook("muc-config-submitted/muc#roomconfig_changesubject", function(event)
42 local new = event.fields["muc#roomconfig_changesubject"]; 42 if set_changesubject(event.room, event.value) then
43 if new ~= nil and set_changesubject(event.room, new) then
44 event.status_codes["104"] = true; 43 event.status_codes["104"] = true;
45 end 44 end
46 end); 45 end);
47 46
48 local function get_subject(room) 47 local function get_subject(room)