diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-10-16 23:00:42 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-10-16 23:00:42 +0500 |
commit | b7e51a203d3d95961294c711ae0d9c449ddb040d (patch) | |
tree | 376af083a7225da43a8659f6d0d6184966d10baa /plugins/mod_offline.lua | |
parent | 85b44a1dfd59fee9a26527cc759ef72780a1668c (diff) | |
download | prosody-b7e51a203d3d95961294c711ae0d9c449ddb040d.tar.gz prosody-b7e51a203d3d95961294c711ae0d9c449ddb040d.zip |
Monster whitespace commit (beware the whitespace monster).
Diffstat (limited to 'plugins/mod_offline.lua')
-rw-r--r-- | plugins/mod_offline.lua | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/mod_offline.lua b/plugins/mod_offline.lua index edd14190..a3ca21d0 100644 --- a/plugins/mod_offline.lua +++ b/plugins/mod_offline.lua @@ -35,20 +35,20 @@ end); module:hook("message/offline/broadcast", function(event) local origin = event.origin; - if origin.priority >= 0 then - local node, host = origin.username, origin.host; - - local data = datamanager.list_load(node, host, "offline"); - if not data then return true; end - for _, stanza in ipairs(data) do - stanza = st.deserialize(stanza); - stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = host, stamp = stanza.attr.stamp}):up(); -- XEP-0203 - stanza:tag("x", {xmlns = "jabber:x:delay", from = host, stamp = stanza.attr.stamp_legacy}):up(); -- XEP-0091 (deprecated) - stanza.attr.stamp, stanza.attr.stamp_legacy = nil, nil; - origin.send(stanza); - end - return true; - end + if origin.priority >= 0 then + local node, host = origin.username, origin.host; + + local data = datamanager.list_load(node, host, "offline"); + if not data then return true; end + for _, stanza in ipairs(data) do + stanza = st.deserialize(stanza); + stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = host, stamp = stanza.attr.stamp}):up(); -- XEP-0203 + stanza:tag("x", {xmlns = "jabber:x:delay", from = host, stamp = stanza.attr.stamp_legacy}):up(); -- XEP-0091 (deprecated) + stanza.attr.stamp, stanza.attr.stamp_legacy = nil, nil; + origin.send(stanza); + end + return true; + end end); module:hook("message/offline/delete", function(event) |