Skip to content

Commit e22f3b9

Browse files
iris-garciaIris
andauthored
fix: Use Slack notification name field instead of channel in Slack (#148)
Co-authored-by: Iris <[email protected]>
1 parent 0653da1 commit e22f3b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sdcclient/_common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ def get_notification_ids(self, channels=None):
191191
found = True
192192
ids.append(ch['id'])
193193
elif c['type'] == 'SLACK':
194-
opt = ch['options']
195-
if 'channel' in opt and opt['channel'] == c['channel']:
196-
found = True
197-
ids.append(ch['id'])
194+
if 'name' in c:
195+
if c['name'] == ch.get('name'):
196+
found = True
197+
ids.append(ch['id'])
198198
elif c['type'] == 'OPSGENIE':
199199
if 'name' in c:
200200
if c['name'] == ch.get('name'):

0 commit comments

Comments
 (0)