This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/dev by this push:
new 1819bc42 fix: align self answer update notification
1819bc42 is described below
commit 1819bc42e53690d05a5d39b2629451beeb284427
Author: Prithvijit Dasgupta <[email protected]>
AuthorDate: Thu Apr 25 08:03:56 2024 -0400
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,