equal
deleted
inserted
replaced
|
1 local st = require"util.stanza"; |
|
2 local datetime = require"util.datetime"; |
|
3 |
|
4 local presence = st.presence({ from = module.host }) |
|
5 :tag("delay", { xmlns = "urn:xmpp:delay", |
|
6 stamp = datetime.datetime(prosody.start_time) }); |
|
7 |
|
8 module:hook("presence/host", function(event) |
|
9 local stanza = event.stanza; |
|
10 if stanza.attr.type == "probe" then |
|
11 presence.attr.id = stanza.attr.id; |
|
12 presence.attr.to = stanza.attr.from; |
|
13 module:send(presence); |
|
14 return true; |
|
15 end |
|
16 end, 10); |
|
17 |