MUC: Fix check for history length update.
authorWaqas Hussain <waqas20@gmail.com>
Mon, 14 May 2012 02:42:42 +0500
changeset 4875 f9fe28461101
parent 4874 4e9781a61242
child 4876 fa41d05ee7ef
MUC: Fix check for history length update.
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Sun May 13 21:07:00 2012 +0100
+++ b/plugins/muc/muc.lib.lua	Mon May 14 02:42:42 2012 +0500
@@ -676,8 +676,8 @@
 	dirty = dirty or (self:get_changesubject() ~= (not changesubject and true or nil))
 	module:log('debug', 'changesubject=%s', changesubject and "true" or "false")
 
-	local historylength = fields['muc#roomconfig_historylength'];
-	dirty = dirty or (self:get_historylength() ~= (historylength and true or nil))
+	local historylength = tonumber(fields['muc#roomconfig_historylength']);
+	dirty = dirty or (historylength and (self:get_historylength() ~= historylength));
 	module:log('debug', 'historylength=%s', historylength)