Mon, 22 Mar 2010 14:28:25 +0000
rostermanager: Don't bump the roster version if it is == true (ie. we are not versioning the roster)
core/rostermanager.lua | file | annotate | diff | comparison | revisions |
--- a/core/rostermanager.lua Mon Mar 22 01:54:22 2010 +0000 +++ b/core/rostermanager.lua Mon Mar 22 14:28:25 2010 +0000 @@ -114,8 +114,14 @@ --end end if roster then - if not roster[false] then roster[false] = {}; end - roster[false].version = (roster[false].version or 0) + 1; + local metadata = roster[false]; + if not metadata then + metadata = {}; + roster[false] = metadata; + end + if metadata.version ~= true then + metadata.version = (metadata.version or 0) + 1; + end return datamanager.store(username, host, "roster", roster); end log("warn", "save_roster: user had no roster to save");