feat: enhance email notification system with tracking and feedback
- Introduced a new feature to track email statuses by implementing a mapping of email IDs. - Added a query to fetch email statuses based on tracked IDs, improving the monitoring of email delivery. - Enhanced the logging system for email and chat notifications, providing detailed feedback on the sending process. - Implemented user feedback messages for various actions, improving the overall user experience. - Refactored the notification sending logic to support better error handling and status updates.
This commit is contained in:
@@ -218,6 +218,25 @@ export const getEmailById = internalQuery({
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Buscar emails por IDs (query pública)
|
||||
*/
|
||||
export const buscarEmailsPorIds = query({
|
||||
args: {
|
||||
emailIds: v.array(v.id("notificacoesEmail")),
|
||||
},
|
||||
handler: async (ctx, args) => {
|
||||
const emails = [];
|
||||
for (const emailId of args.emailIds) {
|
||||
const email = await ctx.db.get(emailId);
|
||||
if (email) {
|
||||
emails.push(email);
|
||||
}
|
||||
}
|
||||
return emails;
|
||||
},
|
||||
});
|
||||
|
||||
export const getActiveEmailConfig = internalQuery({
|
||||
args: {},
|
||||
// Tipo inferido automaticamente pelo Convex
|
||||
|
||||
Reference in New Issue
Block a user