Software /
code /
prosody
Comparison
core/presencemanager.lua @ 649:5f8382768530
Delete the offline message store only when offline messages are present
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 26 Dec 2008 21:48:08 +0500 |
parent | 641:658a2de74afc |
child | 758:b1885732e979 |
comparison
equal
deleted
inserted
replaced
648:3f34b83771eb | 649:5f8382768530 |
---|---|
94 if item.ask then | 94 if item.ask then |
95 request.attr.to = jid; | 95 request.attr.to = jid; |
96 core_route_stanza(origin, request); | 96 core_route_stanza(origin, request); |
97 end | 97 end |
98 end | 98 end |
99 for _, msg in ipairs(offlinemanager.load(node, host) or {}) do | 99 local offline = offlinemanager.load(node, host); |
100 origin.send(msg); -- FIXME do we need to modify to/from in any way? | 100 if offline then |
101 end | 101 for _, msg in ipairs(offline) do |
102 offlinemanager.deleteAll(node, host); | 102 origin.send(msg); -- FIXME do we need to modify to/from in any way? |
103 end | |
104 offlinemanager.deleteAll(node, host); | |
105 end | |
103 end | 106 end |
104 origin.priority = 0; | 107 origin.priority = 0; |
105 if stanza.attr.type == "unavailable" then | 108 if stanza.attr.type == "unavailable" then |
106 origin.presence = nil; | 109 origin.presence = nil; |
107 if origin.directed then | 110 if origin.directed then |