Send email notification when @mentioned in task 📧

Abierto
#626 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
express, javascript, mongodb, node.js
Área
api, backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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!! 🔥

Lenguaje dominante
JavaScript
Estrellas
39
Forks
105
Merge medio
2 d 10 h
PR fusionados (30 d)
22

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de anoopcodehack/DevBoard

Todos los issues de anoopcodehack/DevBoard

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.