From 1819bc42e53690d05a5d39b2629451beeb284427 Mon Sep 17 00:00:00 2001 From: Prithvijit Dasgupta <106804681+prithvidasgupta@users.noreply.github.com> Date: Thu, 25 Apr 2024 08:03:56 -0400 Subject: [PATCH] fix: align self answer update notification --- internal/service/content/answer_service.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/service/content/answer_service.go b/internal/service/content/answer_service.go index d96d75c5..f66ad837 100644 --- a/internal/service/content/answer_service.go +++ b/internal/service/content/answer_service.go @@ -625,6 +625,11 @@ func (as *AnswerService) ShowFormat(ctx context.Context, data *entity.Answer) *s } func (as *AnswerService) notificationUpdateAnswer(ctx context.Context, questionUserID, answerID, answerUserID string) { + // If the answer is updated by me, there is no notification for myself. + // equivalent behaviour as AnswerService.notificationAnswerTheQuestion + if questionUserID == answerUserID { + return + } msg := &schema.NotificationMsg{ TriggerUserID: answerUserID, ReceiverUserID: questionUserID,