@@ -285,12 +285,11 @@ func (ar *AnswerActivityRepo) sendAcceptAnswerNotification(
285285 Type : schema .NotificationTypeAchievement ,
286286 ObjectID : op .AnswerObjectID ,
287287 ReceiverUserID : act .ActivityUserID ,
288+ TriggerUserID : act .TriggerUserID ,
288289 }
289290 if act .ActivityUserID == op .QuestionUserID {
290- msg .TriggerUserID = op .AnswerUserID
291291 msg .ObjectType = constant .AnswerObjectType
292292 } else {
293- msg .TriggerUserID = op .QuestionUserID
294293 msg .ObjectType = constant .AnswerObjectType
295294 }
296295 if msg .TriggerUserID != msg .ReceiverUserID {
@@ -303,9 +302,9 @@ func (ar *AnswerActivityRepo) sendAcceptAnswerNotification(
303302 ReceiverUserID : act .ActivityUserID ,
304303 Type : schema .NotificationTypeInbox ,
305304 ObjectID : op .AnswerObjectID ,
305+ TriggerUserID : op .TriggerUserID ,
306306 }
307307 if act .ActivityUserID != op .QuestionUserID {
308- msg .TriggerUserID = op .TriggerUserID
309308 msg .ObjectType = constant .AnswerObjectType
310309 msg .NotificationAction = constant .NotificationAcceptAnswer
311310 ar .notificationQueueService .Send (ctx , msg )
@@ -317,15 +316,14 @@ func (ar *AnswerActivityRepo) sendCancelAcceptAnswerNotification(
317316 ctx context.Context , op * schema.AcceptAnswerOperationInfo ) {
318317 for _ , act := range op .Activities {
319318 msg := & schema.NotificationMsg {
319+ TriggerUserID : act .TriggerUserID ,
320320 ReceiverUserID : act .ActivityUserID ,
321321 Type : schema .NotificationTypeAchievement ,
322322 ObjectID : op .AnswerObjectID ,
323323 }
324324 if act .ActivityUserID == op .QuestionObjectID {
325- msg .TriggerUserID = op .AnswerObjectID
326325 msg .ObjectType = constant .QuestionObjectType
327326 } else {
328- msg .TriggerUserID = op .QuestionObjectID
329327 msg .ObjectType = constant .AnswerObjectType
330328 }
331329 if msg .TriggerUserID != msg .ReceiverUserID {
0 commit comments