mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
feat(notifications): include client IP in notification payload for share events to improve tracking and context
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user