norgbackup/norg/notifier/notifier.nim

9 lines
263 B
Nim
Raw Normal View History

import ../model/state_type
import ../model/notifier_types
proc notify*(notifiers: seq[Notifier], state: State): int {.discardable.} =
for n in notifiers:
if state in n.states:
echo "Sending notification to " & n.base_url
n.send_notify(state)