~singpolyma/sgx-jmp

324f326e959d5f14bc05d6ceda91953d5a61a3b0 — Stephen Paul Weber 1 year, 4 months ago 1c26971
Add disco info features
1 files changed, 17 insertions(+), 0 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +17 -0
@@ 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")