aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-05-14 02:42:42 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-05-14 02:42:42 +0500
commit4341ffc0b6295a325cfe426d0f892011288c3b9e (patch)
treef6a4ee55c1a90d96276d59d576061e7505c7dd6c
parentd61c6b1760b28051f551acd69a1f18962133bcb0 (diff)
downloadprosody-4341ffc0b6295a325cfe426d0f892011288c3b9e.tar.gz
prosody-4341ffc0b6295a325cfe426d0f892011288c3b9e.zip
MUC: Fix check for history length update.
-rw-r--r--plugins/muc/muc.lib.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 556916f2..31e6809f 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -676,8 +676,8 @@ function room_mt:process_form(origin, stanza)
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)