From c281b88561883d8590b97bb28c4711a41c536e15 Mon Sep 17 00:00:00 2001 From: Iris Date: Tue, 6 Oct 2020 21:08:36 +0200 Subject: [PATCH] Use Slack notification name field instead of channel. --- sdcclient/_common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdcclient/_common.py b/sdcclient/_common.py index 279c4c7c..d0025b6c 100644 --- a/sdcclient/_common.py +++ b/sdcclient/_common.py @@ -191,10 +191,10 @@ def get_notification_ids(self, channels=None): found = True ids.append(ch['id']) elif c['type'] == 'SLACK': - opt = ch['options'] - if 'channel' in opt and opt['channel'] == c['channel']: - found = True - ids.append(ch['id']) + if 'name' in c: + if c['name'] == ch.get('name'): + found = True + ids.append(ch['id']) elif c['type'] == 'OPSGENIE': if 'name' in c: if c['name'] == ch.get('name'):