core/offlinemessage.lua

Thu, 23 Oct 2008 18:42:29 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 23 Oct 2008 18:42:29 +0500
changeset 129
0f119bece309
parent 0
3e3171b59028
child 519
cccd610a0ef9
permissions
-rw-r--r--

Fixed: Some modules did not return anything

0
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
1
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
2 require "util.datamanager"
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
3
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
4 local datamanager = datamanager;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
5 local t_insert = table.insert;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
6
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
7 module "offlinemessage"
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
8
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
9 function new(user, host, stanza)
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
10 local offlinedata = datamanager.load(user, host, "offlinemsg") or {};
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
11 t_insert(offlinedata, stanza);
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
12 return datamanager.store(user, host, "offlinemsg", offlinedata);
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
13 end
129
0f119bece309 Fixed: Some modules did not return anything
Waqas Hussain <waqas20@gmail.com>
parents: 0
diff changeset
14
0f119bece309 Fixed: Some modules did not return anything
Waqas Hussain <waqas20@gmail.com>
parents: 0
diff changeset
15 return _M;

mercurial