From 324f326e959d5f14bc05d6ceda91953d5a61a3b0 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 26 Jul 2021 17:50:55 -0500 Subject: [PATCH] Add disco info features --- sgx_jmp.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sgx_jmp.rb b/sgx_jmp.rb index c2d51cc..ca3005c 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -259,6 +259,10 @@ disco_info to: Blather::JID.new(CONFIG[:component][:jid]) do |iq| type: "sms", category: "gateway" }] + reply.features = [ + "http://jabber.org/protocol/disco#info", + "http://jabber.org/protocol/commands" + ] form = Blather::Stanza::X.find_or_create(reply.query) form.type = "result" form.fields = [ @@ -271,6 +275,19 @@ disco_info to: Blather::JID.new(CONFIG[:component][:jid]) do |iq| self << reply end +disco_info do |iq| + reply = iq.reply + reply.identities = [{ + name: "JMP.chat", + type: "sms", + category: "client" + }] + reply.features = [ + "urn:xmpp:receipts" + ] + self << reply +end + disco_items node: "http://jabber.org/protocol/commands" do |iq| StatsD.increment("command_list") -- 2.34.5