only dm original user entities
Signed-off-by: Kai Dubauskas <kai.dubauskas@doordash.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user