When sending a message containing multiple attachments via the webhook, more often than not the same message is sent 3 times to the slack channel. I'm nearly 100% sure it's due to the combination of DEFAULT_MAX_ATTEMPTS = 3 and retryDelay: 0 in the request options. Setting the retryDelay option to a reasonable value (3000-5000) or allowing both maxAttempts and retryDelay to be set in the Slack constructor from an options object would both fix the issue. Not sure about your contributing requirements/standards but let me know which solution you prefer (or a different one entirely) and whether or not you'd like me to help with a PR.
Thanks!
When sending a message containing multiple attachments via the webhook, more often than not the same message is sent 3 times to the slack channel. I'm nearly 100% sure it's due to the combination of
DEFAULT_MAX_ATTEMPTS = 3andretryDelay: 0in the request options. Setting theretryDelayoption to a reasonable value (3000-5000) or allowing bothmaxAttemptsandretryDelayto be set in the Slack constructor from anoptionsobject would both fix the issue. Not sure about your contributing requirements/standards but let me know which solution you prefer (or a different one entirely) and whether or not you'd like me to help with a PR.Thanks!