summaryrefslogtreecommitdiff
path: root/jakob/dynamic/capabilities/comments.scm
diff options
context:
space:
mode:
Diffstat (limited to 'jakob/dynamic/capabilities/comments.scm')
-rw-r--r--jakob/dynamic/capabilities/comments.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/jakob/dynamic/capabilities/comments.scm b/jakob/dynamic/capabilities/comments.scm
index ee2a52d..d2e34dc 100644
--- a/jakob/dynamic/capabilities/comments.scm
+++ b/jakob/dynamic/capabilities/comments.scm
@@ -20,6 +20,8 @@
#:use-module (jakob dynamic captcha)
#:use-module (jakob dynamic config)
#:use-module (jakob dynamic errors)
+ #:use-module (jakob dynamic logging)
+ #:use-module (jakob dynamic notify)
#:use-module (jakob dynamic util)
#:use-module (json)
#:use-module (squee)
@@ -173,8 +175,15 @@ This is a wrapper around `get-comments-by-slug'."
(assoc-value form-data "captcha")
(string->number (assoc-value form-data "captcha-id")))
(panic "captcha incorrect")))
+ (log-append! 'debug (format #f "Form data: ~a" form-data))
+ (notify 5
+ (if (assoc "subject" form-data)
+ (format #f "New Comment: ~a" (assoc-value form-data "subject"))
+ "New Comment")
+ (format #f "~a: ~a"
+ (assoc-value form-data "name")
+ (assoc-value form-data "comment")))
(insert-comment form-data)))
-
(define (add-reaction reactions reaction)