From bfadbf0b16a6777449bc45106a0d16d6cb742621 Mon Sep 17 00:00:00 2001 From: Denver Gingerich Date: Sun, 26 Apr 2020 18:38:09 +0000 Subject: [PATCH] fix the breakage of non-MMS messages from cd6e0df While maybe a bit awkward (as the conditional is left until the end of the statement), this fix for a non-present 'media' element sure does make for an elegant diff. With this, the SGX works at least as well as at it did before cd6e0df (i.e. as of d49bf12) but the MMS ("picture messaging") support added in cd6e0df does still need some work as mentioned there. In particular, we need to ensure that the media is accessible to the user, which may necessitate us bringing back mpx-catapult in some form (it was deleted in b1aabae). --- sgx-bwmsgsv2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgx-bwmsgsv2.rb b/sgx-bwmsgsv2.rb index 1b6ecb510a28daf16992d69ccf9b7d37cd8878c9..4a960beb4a9b79414124c03cc2645ee45914af9d 100755 --- a/sgx-bwmsgsv2.rb +++ b/sgx-bwmsgsv2.rb @@ -920,7 +920,7 @@ class WebhookHandler < Goliath::API bare_jid, media_url ) end - end + end unless not jparams['media'] else text = "unknown type (#{type})"\ " with text: " + jparams['text']