suppress message delivery receipts for group texts

Denver Gingerich created

Currently there is an interaction bug between this SGX and Cheogram
where Cheogram sends its "Instead of sending messages to cheogram.com
directly..." error if we naively send delivery receipts for group
texts.  This might be related to us sending two separate delivery
receipts with the same ID, but it's still unclear exactly what the
issue is.

So until we solve the problem that causes us to not be able to send
delivery receipts to Cheogram, just turn off that functionality.

This functionality wouldn't work anyway since Cheogram does not yet
support subscription requests on porcelain JIDs, which means we can't
test delivery receipts in most clients (as they need a subscription
before they will enable receipts).

Change summary

sgx-bwmsgsv2.rb | 6 ++++++
1 file changed, 6 insertions(+)

Detailed changes

sgx-bwmsgsv2.rb 🔗

@@ -953,6 +953,12 @@ class WebhookHandler < Goliath::API
 					:wait
 				).to_node
 			when 'message-delivered'
+				# TODO: remove this hack
+				if jparams['to'].length > 1
+					puts "WARN! group no rcpt: #{users_num}"
+					return [200, {}, "OK"]
+				end
+
 				msg = ReceiptMessage.new(bare_jid)
 
 				# TODO: put in member/instance variable