add clickable notification
This commit is contained in:
@@ -90,7 +90,8 @@ func (h *Handler) Upload(c *gin.Context) {
|
||||
go func() {
|
||||
title := "ReSendit: new upload"
|
||||
msg := fmt.Sprintf("%s (%s)\nID: %s", record.Filename, util.HumanSize(record.Size), record.ID)
|
||||
if err := notify.Publish(ntfyURL, topic, title, msg); err != nil {
|
||||
clickUrl := fmt.Sprintf("f/%s", record.ViewID)
|
||||
if err := notify.Publish(ntfyURL, topic, title, msg, clickUrl); err != nil {
|
||||
log.Printf("ntfy publish failed: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user