feat(notifications): include client IP in notification payload for share events to improve tracking and context

This commit is contained in:
keven1024
2026-05-01 23:58:51 +08:00
parent 2ff06946e1
commit 52d041b4c2

View File

@@ -137,7 +137,10 @@ func VaildateShare(c *echo.Context) error {
}
if len(shareInfo.NotifyEmails) > 0 || len(shareInfo.NotifyWebhooks) > 0 {
payload, err := json.Marshal(map[string]string{"share_id": r.ShareId})
payload, err := json.Marshal(map[string]string{
"share_id": r.ShareId,
"ip": c.RealIP(),
})
if err == nil {
_, _ = u.GetQueueClient().Enqueue(asynq.NewTask("share:notify", payload))
}