Skip to content

Releases: moonD4rk/notifier

notifier-v0.3.0

25 May 01:29
64ac929

Choose a tag to compare

First release in three years — major API refresh with breaking changes.

What's new

  • Send is now context-aware: Send(ctx, notifier.Message)
  • Exported notifier.Provider interface — plug in custom channels via WithProvider
  • Two new channels: Telegram (WithTelegram) and WeCom (WithWeCom)
  • Structured errors: *notifier.MultiError with per-provider attribution
  • Message.Extras for channel-specific options (@mentions, sound, MarkdownV2 toggle, etc.)
  • WithHTTPClient to share an HTTP client across providers
  • Zero third-party deps; minimum Go version 1.22

Migration from v0.2.x

// v0.2.x
err := n.Send("subject", "content")

// v0.3.0
err := n.Send(ctx, notifier.Message{Subject: "subject", Content: "content"})

var multi *notifier.MultiError
if errors.As(err, &multi) {
    for _, e := range multi.Errors {
        log.Printf("%s: %v", e.Provider, e.Err)
    }
}

Also: ErrSendNotification*MultiError; notifier.DefaultBarkServerbark.DefaultServer; each provider/*.New(...) now takes a Config struct (top-level WithXxx helpers unchanged).

Security

  • Webhook tokens embedded in URLs are stripped from *url.Error so they no longer leak via error messages or logs
  • Telegram MarkdownV2 Subject/Content auto-escaped, fixing parse errors on ., _, -, etc.

Full Changelog: v0.2.0...v0.3.0

notifier-v0.2.0

26 Apr 08:31
6918d1b

Choose a tag to compare

  • Upgrade Go version to 1.20
  • Fix error handler in providers
  • Refactor separate Options related methods into a standalone file

Full Changelog: v0.1.1...v0.2.0

notifier-v0.1.1

25 Apr 07:30

Choose a tag to compare

Feature:

Full Changelog: v0.1.0...v0.1.1

notifier-v0.1.0

23 Apr 13:09

Choose a tag to compare

Support these providers

Provider Code
DingTalk provider/dingtalk
Bark provider/bark
Lark provider/lark
Feishu provider/feishu