aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_presence.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-10-16 23:00:42 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-10-16 23:00:42 +0500
commitb7e51a203d3d95961294c711ae0d9c449ddb040d (patch)
tree376af083a7225da43a8659f6d0d6184966d10baa /plugins/mod_presence.lua
parent85b44a1dfd59fee9a26527cc759ef72780a1668c (diff)
downloadprosody-b7e51a203d3d95961294c711ae0d9c449ddb040d.tar.gz
prosody-b7e51a203d3d95961294c711ae0d9c449ddb040d.zip
Monster whitespace commit (beware the whitespace monster).
Diffstat (limited to 'plugins/mod_presence.lua')
-rw-r--r--plugins/mod_presence.lua36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index ab2cac38..65abe665 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -59,15 +59,15 @@ function handle_normal_presence(origin, stanza)
priority[1] = "0";
end
end
- local priority = stanza:child_with_name("priority");
- if priority and #priority > 0 then
- priority = t_concat(priority);
- if s_find(priority, "^[+-]?[0-9]+$") then
- priority = tonumber(priority);
- if priority < -128 then priority = -128 end
- if priority > 127 then priority = 127 end
- else priority = 0; end
- else priority = 0; end
+ local priority = stanza:child_with_name("priority");
+ if priority and #priority > 0 then
+ priority = t_concat(priority);
+ if s_find(priority, "^[+-]?[0-9]+$") then
+ priority = tonumber(priority);
+ if priority < -128 then priority = -128 end
+ if priority > 127 then priority = 127 end
+ else priority = 0; end
+ else priority = 0; end
if full_sessions[origin.full_jid] then -- if user is still connected
origin.send(stanza); -- reflect their presence back to them
end
@@ -115,15 +115,15 @@ function handle_normal_presence(origin, stanza)
end
end
- if priority >= 0 then
- local offline = offlinemanager.load(node, host);
- if offline then
- for _, msg in ipairs(offline) do
- origin.send(msg); -- FIXME do we need to modify to/from in any way?
- end
- offlinemanager.deleteAll(node, host);
- end
- end
+ if priority >= 0 then
+ local offline = offlinemanager.load(node, host);
+ if offline then
+ for _, msg in ipairs(offline) do
+ origin.send(msg); -- FIXME do we need to modify to/from in any way?
+ end
+ offlinemanager.deleteAll(node, host);
+ end
+ end
end
if stanza.attr.type == "unavailable" then
origin.presence = nil;