Software /
code /
prosody-modules
Comparison
mod_cloud_notify/mod_cloud_notify.lua @ 2751:6b710a8bdf03
mod_cloud_notify: Implement version 0.3 of XEP-0357
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Thu, 24 Aug 2017 19:06:21 +0200 |
parent | 2749:9756211fcbe3 |
child | 2791:008cf272b7ea |
comparison
equal
deleted
inserted
replaced
2750:1d139e33c502 | 2751:6b710a8bdf03 |
---|---|
248 -- increment count and save it | 248 -- increment count and save it |
249 push_info.count = push_info.count + 1; | 249 push_info.count = push_info.count + 1; |
250 push_store:set_identifier(node, push_identifier, push_info); | 250 push_store:set_identifier(node, push_identifier, push_info); |
251 -- construct push stanza | 251 -- construct push stanza |
252 local stanza_id = hashes.sha256(push_identifier, true); | 252 local stanza_id = hashes.sha256(push_identifier, true); |
253 local push_publish = st.iq({ to = push_info.jid, from = node .. "@" .. module.host, type = "set", id = stanza_id }) | 253 local push_publish = st.iq({ to = push_info.jid, from = module.host, type = "set", id = stanza_id }) |
254 :tag("pubsub", { xmlns = "http://jabber.org/protocol/pubsub" }) | 254 :tag("pubsub", { xmlns = "http://jabber.org/protocol/pubsub" }) |
255 :tag("publish", { node = push_info.node }) | 255 :tag("publish", { node = push_info.node }) |
256 :tag("item") | 256 :tag("item") |
257 :tag("notification", { xmlns = xmlns_push }); | 257 :tag("notification", { xmlns = xmlns_push }); |
258 local form_data = { | 258 local form_data = { |