comparison plugins/muc/history.lib.lua @ 7401:e16b3fd0bd80

MUC: Assign priorities to config form hooks so they have a consistent order on each start
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 20:31:39 +0200
parents 24e2369b67f9
children c2e7dfd87abb
comparison
equal deleted inserted replaced
7400:f1ff321178d4 7401:e16b3fd0bd80
36 name = "muc#roomconfig_historylength"; 36 name = "muc#roomconfig_historylength";
37 type = "text-single"; 37 type = "text-single";
38 label = "Maximum Number of History Messages Returned by Room"; 38 label = "Maximum Number of History Messages Returned by Room";
39 value = tostring(get_historylength(event.room)); 39 value = tostring(get_historylength(event.room));
40 }); 40 });
41 end); 41 end, 100-10);
42 42
43 module:hook("muc-config-submitted/muc#roomconfig_historylength", function(event) 43 module:hook("muc-config-submitted/muc#roomconfig_historylength", function(event)
44 if set_historylength(event.room, event.value) then 44 if set_historylength(event.room, event.value) then
45 event.status_codes["104"] = true; 45 event.status_codes["104"] = true;
46 end 46 end