Remember already sent messaged based on ticket + webhook (not only webhook).

This commit is contained in:
Martin Edenhofer 2016-04-18 10:28:21 +02:00
parent f242f2e125
commit 9851f4e142

View file

@ -95,7 +95,7 @@ backend.perform
# check if reminder_reached/escalation/escalation_warning is already sent today # check if reminder_reached/escalation/escalation_warning is already sent today
md5_webhook = Digest::MD5.hexdigest(local_config['webhook']) md5_webhook = Digest::MD5.hexdigest(local_config['webhook'])
cache_key = "slack::backend::#{@item[:type]}::#{md5_webhook}" cache_key = "slack::backend::#{@item[:type]}::#{ticket.id}::#{md5_webhook}"
if sent_value if sent_value
value = Cache.get(cache_key) value = Cache.get(cache_key)
if value == sent_value if value == sent_value