add clickable notification

This commit is contained in:
2026-04-10 10:14:19 +02:00
parent 0ce248b2f9
commit 8ae5dfc483
4 changed files with 18 additions and 5 deletions

View File

@@ -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)
}
}()