@@ -503,12 +503,13 @@ func (floor *Floor) SendSubscription(tx *gorm.DB) Notification {
503503
504504 // Construct Notification
505505 message := Notification {
506- Data : floor ,
507- Recipients : userIDs ,
508- Description : floor .Content ,
509- Title : "您关注的帖子有新回复" ,
510- Type : MessageTypeFavorite ,
511- URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
506+ Data : floor ,
507+ Recipients : userIDs ,
508+ Description : floor .Content ,
509+ Title : "您关注的帖子有新回复" ,
510+ Type : MessageTypeFavorite ,
511+ URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
512+ RelatedFloorID : & floor .ID ,
512513 }
513514
514515 return message
@@ -530,12 +531,13 @@ func (floor *Floor) SendReply(tx *gorm.DB) Notification {
530531
531532 // construct message
532533 message := Notification {
533- Data : floor ,
534- Recipients : userIDs ,
535- Description : floor .Content ,
536- Title : "您的内容有新回复" ,
537- Type : MessageTypeReply ,
538- URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
534+ Data : floor ,
535+ Recipients : userIDs ,
536+ Description : floor .Content ,
537+ Title : "您的内容有新回复" ,
538+ Type : MessageTypeReply ,
539+ URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
540+ RelatedFloorID : & floor .ID ,
539541 }
540542
541543 return message
@@ -555,12 +557,13 @@ func (floor *Floor) SendMention(_ *gorm.DB) Notification {
555557
556558 // construct message
557559 message := Notification {
558- Data : floor ,
559- Recipients : userIDs ,
560- Description : floor .Content ,
561- Title : "您的内容被引用了" ,
562- Type : MessageTypeMention ,
563- URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
560+ Data : floor ,
561+ Recipients : userIDs ,
562+ Description : floor .Content ,
563+ Title : "您的内容被引用了" ,
564+ Type : MessageTypeMention ,
565+ URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
566+ RelatedFloorID : & floor .ID ,
564567 }
565568
566569 return message
@@ -572,12 +575,13 @@ func (floor *Floor) SendModify(_ *gorm.DB) error {
572575
573576 // construct message
574577 message := Notification {
575- Data : floor ,
576- Recipients : userIDs ,
577- Description : floor .Content ,
578- Title : "您的内容被管理员修改了" ,
579- Type : MessageTypeModify ,
580- URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
578+ Data : floor ,
579+ Recipients : userIDs ,
580+ Description : floor .Content ,
581+ Title : "您的内容被管理员修改了" ,
582+ Type : MessageTypeModify ,
583+ URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
584+ RelatedFloorID : & floor .ID ,
581585 }
582586
583587 // send
@@ -598,12 +602,13 @@ func (floor *Floor) SendSensitive(_ *gorm.DB) error {
598602 // construct message
599603 desc := "您有待审核的内容"
600604 message := Notification {
601- Data : floor ,
602- Recipients : userIDs ,
603- Description : desc ,
604- Title : desc ,
605- Type : MessageTypeSensitive ,
606- URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
605+ Data : floor ,
606+ Recipients : userIDs ,
607+ Description : desc ,
608+ Title : desc ,
609+ Type : MessageTypeSensitive ,
610+ URL : fmt .Sprintf ("/api/floors/%d" , floor .ID ),
611+ RelatedFloorID : & floor .ID ,
607612 }
608613 _ , err := message .Send ()
609614 utils .Notify (utils .NotificationTargetFeishuAdmin , desc + fmt .Sprintf ("\n ##%d\n \n %s\n \n %s" , floor .ID , floor .Content , floor .SensitiveDetail ))
0 commit comments