diff --git a/.changeset/curvy-socks-punch.md b/.changeset/curvy-socks-punch.md index 6933ad8847..2d06b292ec 100644 --- a/.changeset/curvy-socks-punch.md +++ b/.changeset/curvy-socks-punch.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-notifications-backend-module-slack': patch +'@backstage/plugin-notifications-backend-module-slack': minor --- -Fix skipped slack DMS for users when a group entity is a recipient +**BREAKING**: Notifications sent to non-user entities no longer send Slack DMs to resolved users. diff --git a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts index 648bc5aa80..897e0feabe 100644 --- a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts +++ b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts @@ -281,11 +281,8 @@ export class SlackNotificationProcessor implements NotificationProcessor { parseEntityRef(notification.user), ); - if ( - entityRefs.some(e => parseEntityRef(e).kind === 'group') && - !explicitUserEntityRefs.includes(normalizedUserRef) - ) { - // This user was resolved from a non-user entity and we've already sent a group channel message. + if (!explicitUserEntityRefs.includes(normalizedUserRef)) { + // This user was resolved from a non-user entity. Skip sending aDM. return; }