42 return true; |
42 return true; |
43 end |
43 end |
44 end |
44 end |
45 -- no resources are online |
45 -- no resources are online |
46 local node, host = jid_split(bare); |
46 local node, host = jid_split(bare); |
|
47 local ok |
47 if user_exists(node, host) then |
48 if user_exists(node, host) then |
48 -- TODO apply the default privacy list |
49 -- TODO apply the default privacy list |
49 |
50 |
50 module:fire_event('message/offline/store', { |
51 ok = module:fire_event('message/offline/store', { |
51 origin = origin, |
52 origin = origin, |
52 stanza = stanza, |
53 stanza = stanza, |
53 }); |
54 }); |
54 else |
55 end |
|
56 |
|
57 if not ok then |
55 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); |
58 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); |
56 end |
59 end |
57 end |
60 end |
58 return true; |
61 return true; |
59 end |
62 end |