aboutsummaryrefslogtreecommitdiffstats
path: root/core/offlinemessage.lua
diff options
context:
space:
mode:
authormatthew <devnull@localhost>2008-08-22 21:09:04 +0000
committermatthew <devnull@localhost>2008-08-22 21:09:04 +0000
commitd0a4f8f2fb4b0927a67ebc7428d6c5cb66d2fbd4 (patch)
tree7582e73a42b4becdfb964269bfaee8ab3a16317c /core/offlinemessage.lua
downloadprosody-d0a4f8f2fb4b0927a67ebc7428d6c5cb66d2fbd4.tar.gz
prosody-d0a4f8f2fb4b0927a67ebc7428d6c5cb66d2fbd4.zip
First commit, where do you want to go tomorrow?
Diffstat (limited to 'core/offlinemessage.lua')
-rw-r--r--core/offlinemessage.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/offlinemessage.lua b/core/offlinemessage.lua
new file mode 100644
index 00000000..dda9b7d8
--- /dev/null
+++ b/core/offlinemessage.lua
@@ -0,0 +1,13 @@
+
+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