Software /
code /
prosody
Comparison
plugins/mod_offline.lua @ 4037:5262d3eb7f01
mod_presence, mod_offline: Merge message/offline/delete with message/offline/broadcast.
author | Robert Hoelz <rob@hoelz.ro> |
---|---|
date | Thu, 09 Dec 2010 12:28:05 -0600 |
parent | 3540:bc139431830b |
child | 3971:faace741d0f9 |
comparison
equal
deleted
inserted
replaced
4036:32b55f06a3bd | 4037:5262d3eb7f01 |
---|---|
45 stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = host, stamp = stanza.attr.stamp}):up(); -- XEP-0203 | 45 stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = host, stamp = stanza.attr.stamp}):up(); -- XEP-0203 |
46 stanza:tag("x", {xmlns = "jabber:x:delay", from = host, stamp = stanza.attr.stamp_legacy}):up(); -- XEP-0091 (deprecated) | 46 stanza:tag("x", {xmlns = "jabber:x:delay", from = host, stamp = stanza.attr.stamp_legacy}):up(); -- XEP-0091 (deprecated) |
47 stanza.attr.stamp, stanza.attr.stamp_legacy = nil, nil; | 47 stanza.attr.stamp, stanza.attr.stamp_legacy = nil, nil; |
48 origin.send(stanza); | 48 origin.send(stanza); |
49 end | 49 end |
50 datamanager.list_store(node, host, "offline", nil); | |
50 return true; | 51 return true; |
51 end | 52 end |
52 end); | 53 end); |
53 | |
54 module:hook("message/offline/delete", function(event) | |
55 local origin = event.origin; | |
56 local node, host = origin.username, origin.host; | |
57 | |
58 return datamanager.list_store(node, host, "offline", nil); | |
59 end); |