From d49bf12b8618ced08ba594889815e316085ae53c Mon Sep 17 00:00:00 2001 From: Denver Gingerich Date: Sat, 25 Apr 2020 01:25:48 +0000 Subject: [PATCH] suppress message delivery receipts for group texts 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). --- sgx-bwmsgsv2.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sgx-bwmsgsv2.rb b/sgx-bwmsgsv2.rb index 1aba0c99c2f24fb10fc3b17520f7812ee367bd3a..a1e1b00fea8b0dd19dc6f6ac1f47a14248f3ad4f 100755 --- a/sgx-bwmsgsv2.rb +++ b/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