Software /
code /
prosody-modules
Comparison
mod_storage_memory/mod_storage_memory.lua @ 1760:e72f9eac51c8
mod_storage_(various): Order swapping in 54c8a0cb2996 was backwards
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 21 May 2015 12:09:47 +0200 |
parent | 1753:54c8a0cb2996 |
child | 2097:4454f124465a |
comparison
equal
deleted
inserted
replaced
1759:0aeab7234d5e | 1760:e72f9eac51c8 |
---|---|
42 local archive_store = {}; | 42 local archive_store = {}; |
43 archive_store.__index = archive_store; | 43 archive_store.__index = archive_store; |
44 | 44 |
45 function archive_store:append(username, key, value, when, with) | 45 function archive_store:append(username, key, value, when, with) |
46 if type(when) ~= "number" then | 46 if type(when) ~= "number" then |
47 value, when, with = when, with, value; | 47 when, with, value = value, when, with; |
48 end | 48 end |
49 local a = self.store[username]; | 49 local a = self.store[username]; |
50 if not a then | 50 if not a then |
51 a = {}; | 51 a = {}; |
52 self.store[username] = a; | 52 self.store[username] = a; |