# HG changeset patch # User Matthew Wild # Date 1591824000 -3600 # Node ID f4999d75d3057d05c7cdc8db4734b01034e39995 # Parent 78ac5500a844a254ae485795c0beab07d6585291# Parent a533abe6ffd025f2c645ac593d483f6759905b4b Merge diff -r a533abe6ffd0 -r f4999d75d305 mod_measure_memory/mod_measure_memory.lua --- a/mod_measure_memory/mod_measure_memory.lua Mon Jun 08 18:39:16 2020 +0200 +++ b/mod_measure_memory/mod_measure_memory.lua Wed Jun 10 22:20:00 2020 +0100 @@ -5,7 +5,7 @@ local measures = {}; setmetatable(measures, { __index = function (t, k) - local m = measure("amount", "memory."..k); t[k] = m; return m; + local m = measure("amount", "memory."..k, { units = "bytes" }); t[k] = m; return m; end }); diff -r a533abe6ffd0 -r f4999d75d305 mod_pubsub_text_interface/mod_pubsub_text_interface.lua --- a/mod_pubsub_text_interface/mod_pubsub_text_interface.lua Mon Jun 08 18:39:16 2020 +0200 +++ b/mod_pubsub_text_interface/mod_pubsub_text_interface.lua Wed Jun 10 22:20:00 2020 +0100 @@ -4,6 +4,7 @@ local pubsub = module:depends "pubsub".service; +local xmlns_quick_resp = "urn:xmpp:tmp:quick-response"; local name = module:get_option_string("name", "PubSub Service on "..module.host); local help = name..[[ @@ -33,6 +34,8 @@ if command == "help" then reply:body(help); + reply:tag("response", { xmlns = xmlns_quick_resp, value = "list", }):up(); + reply:tag("response", { xmlns = xmlns_quick_resp, value = "subscriptions", }):up(); elseif command == "list" then local ok, nodes = pubsub:get_nodes(from); if ok then @@ -54,6 +57,8 @@ local response = {}; for i = 1, #subs do response[i] = string.format("- `%s`", subs[i].node); + reply:tag("response", { xmlns = xmlns_quick_resp, value = "unsubscribe "..subs[i].node, }):up(); + reply:tag("response", { xmlns = xmlns_quick_resp, value = "last "..subs[i].node, }):up(); end reply:body(table.concat(response, "\n")); end @@ -77,6 +82,7 @@ end else reply:body("Unknown command. `help` to list commands."); + reply:tag("response", { xmlns = xmlns_quick_resp, value = "help", }):up(); end reply:reset(); @@ -84,6 +90,14 @@ reply:tag("received", { xmlns = "urn:xmpp:receipts", id = stanza.attr.id }):up(); end + if stanza:get_child("no-copy", "urn:xmpp:hints") then + reply:tag("no-copy", { xmlns = "urn:xmpp:hints" }):up(); + end + + if stanza:get_child("no-store", "urn:xmpp:hints") then + reply:tag("no-store", { xmlns = "urn:xmpp:hints" }):up(); + end + module:send(reply); return true; end);