~singpolyma/sgx-jmp

75652d70ac527e987b2eefbf5264ab7b8e77d961 — Stephen Paul Weber 3 years ago 22b1197
Remove some of the noise from the command list
1 files changed, 8 insertions(+), 18 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +8 -18
@@ 244,27 244,17 @@ disco_items node: "http://jabber.org/protocol/commands" do |iq|
	reply.items = [
		# TODO: don't show this item if no braintree methods available
		# TODO: don't show this item if no plan for this customer
		{ node: "buy-credit", name: "Buy account credit" },
		{ node: "jabber:iq:register", name: "Register" },
		{ node: "usage", name: "Show Monthly Usage" },
		{ node: "reset sip account", name: "Create or Reset SIP Account" }
	].map do |item|
		Blather::Stanza::DiscoItems::Item.new(
			iq.to,
			"buy-credit",
			"Buy account credit"
		),
		Blather::Stanza::DiscoItems::Item.new(
			iq.to,
			"jabber:iq:register",
			"Register"
		),
		Blather::Stanza::DiscoItems::Item.new(
			iq.to,
			"usage",
			"Show Monthly Usage"
		),
		Blather::Stanza::DiscoItems::Item.new(
			iq.to,
			"reset sip account",
			"Create or Reset SIP Account"
			item[:node],
			item[:name]
		)
	]
	end
	self << reply
end