config.dhall.sample 🔗
@@ -34,6 +34,9 @@
CAD = ""
}
},
+ xep0157 = {
+ { var = "support-addresses", value = "xmpp:+14169938000@cheogram.com" }
+ },
plans = ./plans.dhall
electrum = ./electrum.dhall,
oxr_app_id = "",
Stephen Paul Weber created
Allows us to advertise support address, for eventual inclusion in Cheogram adhoc
bot help output.
config.dhall.sample | 3 +++
sgx_jmp.rb | 19 +++++++++++++++++++
2 files changed, 22 insertions(+)
@@ -34,6 +34,9 @@
CAD = ""
}
},
+ xep0157 = {
+ { var = "support-addresses", value = "xmpp:+14169938000@cheogram.com" }
+ },
plans = ./plans.dhall
electrum = ./electrum.dhall,
oxr_app_id = "",
@@ -174,6 +174,25 @@ IQ_MANAGER = SessionManager.new(self, :id)
COMMAND_MANAGER = SessionManager.new(self, :sessionid, timeout: 60 * 60)
web_register_manager = WebRegisterManager.new
+disco_info to: Blather::JID.new(CONFIG[:component][:jid]) do |iq|
+ reply = iq.reply
+ reply.identities = [{
+ name: "JMP.chat",
+ type: "sms",
+ category: "gateway"
+ }]
+ form = Blather::Stanza::X.find_or_create(reply.query)
+ form.type = "result"
+ form.fields = [
+ {
+ var: "FORM_TYPE",
+ type: "hidden",
+ value: "http://jabber.org/network/serverinfo"
+ }
+ ] + CONFIG[:xep0157]
+ self << reply
+end
+
disco_items node: "http://jabber.org/protocol/commands" do |iq|
reply = iq.reply
reply.items = [