aboutsummaryrefslogtreecommitdiffstats
path: root/core/offlinemessage.lua
blob: ebb357ba475a089b20d9a422285aa3b61b82d3aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

require "util.datamanager"

local datamanager = datamanager;
local t_insert = table.insert;

module "offlinemessage"

function new(user, host, stanza)
	local offlinedata = datamanager.load(user, host, "offlinemsg") or {};
	t_insert(offlinedata, stanza);
	return datamanager.store(user, host, "offlinemsg", offlinedata);
end

return _M;