Software / code / prosody-modules
Comparison
mod_cloud_notify/mod_cloud_notify.lua @ 1908:eba279ddc050
mod_cloud_notify: Add some comments describing code blocks
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 14 Oct 2015 14:07:08 +0200 |
| parent | 1907:7fe7bd7b33b6 |
| child | 1909:c7389fe74de7 |
comparison
equal
deleted
inserted
replaced
| 1907:7fe7bd7b33b6 | 1908:eba279ddc050 |
|---|---|
| 7 local jid = require"util.jid"; | 7 local jid = require"util.jid"; |
| 8 local dataform = require"util.dataforms".new; | 8 local dataform = require"util.dataforms".new; |
| 9 | 9 |
| 10 local xmlns_push = "urn:xmpp:push:0"; | 10 local xmlns_push = "urn:xmpp:push:0"; |
| 11 | 11 |
| 12 -- For keeping state across reloads | |
| 13 local push_enabled = module:shared("push-enabled-users"); | |
| 14 | |
| 15 -- http://xmpp.org/extensions/xep-0357.html#disco | |
| 12 module:add_feature(xmlns_push); | 16 module:add_feature(xmlns_push); |
| 13 | |
| 14 local push_enabled = module:shared("push-enabled-users"); | |
| 15 | 17 |
| 16 -- http://xmpp.org/extensions/xep-0357.html#enabling | 18 -- http://xmpp.org/extensions/xep-0357.html#enabling |
| 17 module:hook("iq-set/self/"..xmlns_push..":enable", function (event) | 19 module:hook("iq-set/self/"..xmlns_push..":enable", function (event) |
| 18 local origin, stanza = event.origin, event.stanza; | 20 local origin, stanza = event.origin, event.stanza; |
| 19 -- MUST contain a 'jid' attribute of the XMPP Push Service being enabled | 21 -- MUST contain a 'jid' attribute of the XMPP Push Service being enabled |