fix: Add a check for thread_ts (#1389)

- If no thread timestamp is available, ignore the message
- Add specs to cover the case
This commit is contained in:
Pranav Raj S
2020-11-09 22:01:57 +05:30
committed by GitHub
parent 7718cf7d2c
commit 2babfd6148
3 changed files with 38 additions and 3 deletions

View File

@@ -41,8 +41,12 @@ class Integrations::Slack::IncomingMessageBuilder
params[:type] == 'url_verification'
end
def thread_timestamp_available?
params[:event][:thread_ts].present?
end
def create_message?
supported_message? && integration_hook
thread_timestamp_available? && supported_message? && integration_hook
end
def message