feat: timeline 'Comentário adicionado' com autor; skeletons na página de detalhe; skeleton nas filas; alias de Convex já padronizado; mutation addComment inclui authorName/avatar

This commit is contained in:
esdrasrenan 2025-10-04 01:45:57 -03:00
parent da1633a30e
commit 9b0c0bd80a
5 changed files with 128 additions and 4 deletions

View file

@ -256,10 +256,11 @@ export const addComment = mutation({
createdAt: now,
updatedAt: now,
});
const author = await ctx.db.get(args.authorId);
await ctx.db.insert("ticketEvents", {
ticketId: args.ticketId,
type: "COMMENT_ADDED",
payload: { authorId: args.authorId },
payload: { authorId: args.authorId, authorName: author?.name, authorAvatar: author?.avatarUrl },
createdAt: now,
});
// bump ticket updatedAt