core/offlinemessage.lua

Sat, 04 Oct 2008 02:12:54 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 04 Oct 2008 02:12:54 +0100
changeset 44
80d2ade0fd69
parent 0
3e3171b59028
child 129
0f119bece309
permissions
-rw-r--r--

Add "uuid" library and make sessionmanager use this.
...and yes, the uuid generation needs work :P


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

mercurial