From 9fece75a3c44f4b79c8d9cd3624aac8bf31808bf Mon Sep 17 00:00:00 2001 From: Denver Gingerich Date: Wed, 6 May 2020 00:22:55 +0000 Subject: [PATCH] more prep for jmp-fwdcalls compat: V1-provided arg This is a continuation of the work started in 90a21bc, which prepares the SGX for integration with jmp-fwdcalls and its V1 dependence. Left out from that previous commit was a mention of where we first did the V1->V2 switch in this SGX. For the URL code of important to the call_catapult() method, this was in a9237ee. Back to this commit, we have paved the way for jmp-fwdcalls to pass us a config file containing the V1 credentials, which we can then use when we detect a V1 path in call_catapult() and convert accordingly. --- sgx-bwmsgsv2.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sgx-bwmsgsv2.rb b/sgx-bwmsgsv2.rb index b602001eeb5c59c8b7f468fd27a4420d22d5437c..627c9baff6b45b9e88298f22cc4c9bc6b490490d 100755 --- a/sgx-bwmsgsv2.rb +++ b/sgx-bwmsgsv2.rb @@ -92,6 +92,7 @@ module SGXbwmsgsv2 ] def self.run + # TODO: read/save ARGV[7] creds to local variables client.run end @@ -213,6 +214,7 @@ module SGXbwmsgsv2 # begin hack for running V2 messages along with V1 voice url_prefix = 'https://api.catapult.inetwork.com/' # TODO: set token and secret to vals provided at startup + # TODO: replace pth's user_id with user_id from ARGV[7] else # TODO: error end @@ -1036,11 +1038,11 @@ at_exit do puts "Soprani.ca/SMS Gateway for XMPP - Bandwidth API V2\n"\ "==>> last commit of this version is " + `git rev-parse HEAD` + "\n" - if ARGV.size != 7 + if ARGV.size != 7 and ARGV.size != 8 puts "Usage: sgx-bwmsgsv2.rb "\ " "\ " "\ - " " + " [V1_creds_file]" exit 0 end