Send email notification when @mentioned in task 📧

Aperta
#626 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
express, javascript, mongodb, node.js
Ambito
api, backend

Direzione di ricerca

Start by reading the task routes in server/routes/tasks.js and checking how users and email configuration are handled in the project. The issue proposes notifying users mentioned in a task description on create and update, and adding SMTP settings to .env.example. Done means both routes send the specified notification to matched users and the email setup is documented; verify the relevant task routes and tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement good first issue

Send email notification when @mentioned in task 📧

File: server/routes/tasks.js

You can @mention people in descriptions
but they never get notified 💀 fr!!

Fix: parse mentions on task save:
const nodemailer = require('nodemailer')

const extractMentions = (text) => {
const matches = text.match(/@(\w+)/g) || []
return matches.map(m => m.slice(1))
}

// in POST /api/tasks and PUT /api/tasks/🆔
const mentions = extractMentions(
req.body.description || ''
)

if (mentions.length > 0) {
const mentionedUsers = await User.find({
name: { $in: mentions }
})
// send email to each mentioned user
mentionedUsers.forEach(async (user) => {
await transporter.sendMail({
to: user.email,
subject: 'You were mentioned in DevBoard',
text: You were mentioned in task: "${req.body.title}"
})
})
}

Add SMTP config to .env.example:
[email protected]
EMAIL_PASS=your_app_password

~20 lines! nodemailer package needed 🎯
Real team collaboration feature!! 🔥

Lingua principale
JavaScript
Stelle
39
Fork
105
Merge medio
2g 10h
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anoopcodehack/DevBoard

Tutte le issue di anoopcodehack/DevBoard

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.