We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f28755 commit ccd7558Copy full SHA for ccd7558
server/src/resolvers/answer.js
@@ -31,10 +31,18 @@ module.exports = {
31
`
32
{
33
id
34
+ user {
35
+ id
36
+ }
37
node {
38
flags(where:{type:"unanswered"}) {
39
40
}
41
+ question {
42
43
44
45
46
47
48
@@ -67,7 +75,12 @@ module.exports = {
67
75
})
68
76
69
77
algolia.updateNode(ctx, nodeId)
70
- mailgun.sendNewAnswer(ctx, nodeId)
78
+
79
+ // Let's notify the user who asked the question, but only if they did not answer the
80
+ // question them-selves.
81
+ if (answer.node.question.user.id !== answer.user.id) {
82
+ mailgun.sendNewAnswer(ctx, nodeId)
83
71
84
72
85
return ctx.prisma.query.answer(
73
86
0 commit comments