@@ -2,6 +2,7 @@ package comment
22
33import (
44 "context"
5+ "github.com/answerdev/answer/pkg/token"
56 "time"
67
78 "github.com/answerdev/answer/internal/base/constant"
@@ -17,7 +18,6 @@ import (
1718 "github.com/answerdev/answer/internal/service/object_info"
1819 "github.com/answerdev/answer/internal/service/permission"
1920 usercommon "github.com/answerdev/answer/internal/service/user_common"
20- "github.com/answerdev/answer/pkg/encryption"
2121 "github.com/answerdev/answer/pkg/htmltext"
2222 "github.com/answerdev/answer/pkg/uid"
2323 "github.com/jinzhu/copier"
@@ -508,7 +508,7 @@ func (cs *CommentService) notificationQuestionComment(ctx context.Context, quest
508508 QuestionID : questionID ,
509509 CommentID : commentID ,
510510 CommentSummary : commentSummary ,
511- UnsubscribeCode : encryption . MD5 ( receiverUserInfo . Pass ),
511+ UnsubscribeCode : token . GenerateToken ( ),
512512 }
513513 commentUser , _ , _ := cs .userCommon .GetUserBasicInfoByID (ctx , commentUserID )
514514 if commentUser != nil {
@@ -556,7 +556,7 @@ func (cs *CommentService) notificationAnswerComment(ctx context.Context,
556556 AnswerID : answerID ,
557557 CommentID : commentID ,
558558 CommentSummary : commentSummary ,
559- UnsubscribeCode : encryption . MD5 ( receiverUserInfo . Pass ),
559+ UnsubscribeCode : token . GenerateToken ( ),
560560 }
561561 commentUser , _ , _ := cs .userCommon .GetUserBasicInfoByID (ctx , commentUserID )
562562 if commentUser != nil {
0 commit comments