Software /
code /
prosody-modules
Comparison
mod_pubsub_text_interface/mod_pubsub_text_interface.lua @ 4644:bbf9e36db3a9
mod_pubsub_text_interface: Fix move quick response tags out of <body>
Seems there's an API change between 0.11.x and trunk changing the
behavior of :body(), so previously it worked in trunk but broke in 0.11
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 13 Aug 2021 00:57:33 +0200 |
parent | 4489:725768d83830 |
child | 4645:25ce28711fac |
comparison
equal
deleted
inserted
replaced
4643:df09f9ce0b1b | 4644:bbf9e36db3a9 |
---|---|
31 | 31 |
32 local command, node_arg = body:match("^(%a+)%s+(.*)"); | 32 local command, node_arg = body:match("^(%a+)%s+(.*)"); |
33 command = (command or body):lower(); | 33 command = (command or body):lower(); |
34 | 34 |
35 if command == "help" then | 35 if command == "help" then |
36 reply:body(help); | 36 reply:body(help):up(); |
37 reply:tag("response", { xmlns = xmlns_quick_resp, value = "list", }):up(); | 37 reply:tag("response", { xmlns = xmlns_quick_resp, value = "list", }):up(); |
38 reply:tag("response", { xmlns = xmlns_quick_resp, value = "subscriptions", }):up(); | 38 reply:tag("response", { xmlns = xmlns_quick_resp, value = "subscriptions", }):up(); |
39 elseif command == "list" then | 39 elseif command == "list" then |
40 local ok, nodes = pubsub:get_nodes(from); | 40 local ok, nodes = pubsub:get_nodes(from); |
41 if ok then | 41 if ok then |