merge "Should not crash if id or resource missing"

Denver Gingerich created

This crash is particularly bad because it currently causes
sgx-catapult to get stuck.  We'll fix that in a future commit.  Also,
a future commit will apply this fix to the other tagged message send.

See merge request !5 for the discussion and details behind this merge.

Change summary

sgx-catapult.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

sgx-catapult.rb 🔗

@@ -175,9 +175,9 @@ module SGXcatapult
 			'text'			=> m.body,
 			'tag'			=>
 				# callbacks need both the id and resourcepart
-				WEBrick::HTTPUtils.escape(m.id) + ' ' +
+				WEBrick::HTTPUtils.escape(m.id.to_s) + ' ' +
 				WEBrick::HTTPUtils.escape(
-					m.from.to_s.split('/', 2)[1]
+					m.from.to_s.split('/', 2)[1].to_s
 				),
 			'receiptRequested'	=> 'all',
 			'callbackUrl'		=> ARGV[6]