Skip to content

Commit

Permalink
notify only assigned users about issue events
Browse files Browse the repository at this point in the history
  • Loading branch information
ghackenberg committed Oct 20, 2024
1 parent e201113 commit c0e2641
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class CommentService implements CommentREST {
const text = String(await unified().use(remarkParse).use(remarkRehype).use(rehypeStringify).process(comment.text)).replace('src="/', 'style="max-width: 100%" src="https://caddrive.com/').replace('href="/', 'href="https://caddrive.com/')
const members = await Database.get().memberRepository.findBy({ productId: product.productId, deleted: IsNull() })
for (const member of members) {
if (member.userId != this.request.user.userId) {
if (member.userId != this.request.user.userId && issue.assignedUserIds.includes(member.userId)) {
const user = await Database.get().userRepository.findOneBy({ userId: member.userId })
if (!user.deleted && user.emailNotification) {
const transporter = await TRANSPORTER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class IssueService implements IssueREST {
// Send emails
const members = await Database.get().memberRepository.findBy({ productId: product.productId, deleted: IsNull() })
for (const member of members) {
if (member.userId != this.request.user.userId) {
if (member.userId != this.request.user.userId && issue.assignedUserIds.includes(member.userId)) {
const user = await Database.get().userRepository.findOneBy({ userId: member.userId })
if (!user.deleted && user.emailNotification) {
const transporter = await TRANSPORTER
Expand Down

0 comments on commit c0e2641

Please sign in to comment.