Software / code / prosody
Annotate
core/offlinemessage.lua @ 30:bcf539295f2d
Huge commit to:
* Break stanza routing (to be restored in a future commit)
* Remove the old stanza_dispatcher code, which was never going to be maintainable nor extendable :)
* Bring us plugins, starting with mod_legacyauth and mod_roster
* Sessions are now created/destroyed using a standard sessionmanager interface
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 30 Sep 2008 19:52:00 +0100 |
| parent | 0:3e3171b59028 |
| child | 129:0f119bece309 |
| rev | line source |
|---|---|
| 0 | 1 |
| 2 require "util.datamanager" | |
| 3 | |
| 4 local datamanager = datamanager; | |
| 5 local t_insert = table.insert; | |
| 6 | |
| 7 module "offlinemessage" | |
| 8 | |
| 9 function new(user, host, stanza) | |
| 10 local offlinedata = datamanager.load(user, host, "offlinemsg") or {}; | |
| 11 t_insert(offlinedata, stanza); | |
| 12 return datamanager.store(user, host, "offlinemsg", offlinedata); | |
| 13 end |