Mercurial > prosody-hg
annotate core/offlinemessage.lua @ 264:a296b61baad8
Only reply with errors if the stanza is not an error or a result (don't know how much bandwidth this just cost me :) )
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 14 Nov 2008 18:46:00 +0000 |
| parents | 0f119bece309 |
| children | cccd610a0ef9 |
| 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 | |
|
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; |
