mirror of
https://github.com/status-im/spiffworkflow-connector.git
synced 2025-02-22 19:48:07 +00:00
avoid sending messages to waku w/ burnettk
This commit is contained in:
parent
9d0f957935
commit
20420911b2
@ -63,22 +63,25 @@ class SendMessage:
|
|||||||
"""Execute."""
|
"""Execute."""
|
||||||
responses = []
|
responses = []
|
||||||
all_calls_returned_200 = True
|
all_calls_returned_200 = True
|
||||||
for rec in self.recipient:
|
|
||||||
# we also tried wakuext_sendContactRequest before wakuext_addContact.
|
|
||||||
# wakuext_sendContactRequest also took a third parameter after the rec parameter for the message that would appear
|
|
||||||
# alongside the contact request. But the message also appeared in your messages foreever and ever, which was not
|
|
||||||
# very compatible with sending a contact request with every message. Now, if you are not already a contact, you get
|
|
||||||
# a prompt to approve the request, and then you get all of the messages from the "spiff" user.
|
|
||||||
response, status_code = self.send_message('wakuext_addContact', rec)
|
|
||||||
if status_code == 200:
|
|
||||||
response, status_code = self.send_message(self.message_type, rec, self.message)
|
|
||||||
if status_code != 200:
|
|
||||||
all_calls_returned_200 = False
|
|
||||||
|
|
||||||
responses.append({
|
# FIXME: commented out so we can test without interferring with waku messages during UAT.
|
||||||
"response": response,
|
# comment back in once that is done!!!!!!!!!!!!!!
|
||||||
"status": status_code,
|
# for rec in self.recipient:
|
||||||
})
|
# # we also tried wakuext_sendContactRequest before wakuext_addContact.
|
||||||
|
# # wakuext_sendContactRequest also took a third parameter after the rec parameter for the message that would appear
|
||||||
|
# # alongside the contact request. But the message also appeared in your messages foreever and ever, which was not
|
||||||
|
# # very compatible with sending a contact request with every message. Now, if you are not already a contact, you get
|
||||||
|
# # a prompt to approve the request, and then you get all of the messages from the "spiff" user.
|
||||||
|
# response, status_code = self.send_message('wakuext_addContact', rec)
|
||||||
|
# if status_code == 200:
|
||||||
|
# response, status_code = self.send_message(self.message_type, rec, self.message)
|
||||||
|
# if status_code != 200:
|
||||||
|
# all_calls_returned_200 = False
|
||||||
|
#
|
||||||
|
# responses.append({
|
||||||
|
# "response": response,
|
||||||
|
# "status": status_code,
|
||||||
|
# })
|
||||||
return ({
|
return ({
|
||||||
"response": json.dumps(responses),
|
"response": json.dumps(responses),
|
||||||
"node_returned_200": all_calls_returned_200,
|
"node_returned_200": all_calls_returned_200,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user