From 8d3ab61e7c136610ae1dc002226559e8c6b21fcb Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 3 Apr 2021 13:44:25 -0400 Subject: feat(panettone): Send email notifications for comments When a user posts a comment on an issue, send email notifications (respecting the enable-email-notifications setting) to the author of that issue and all the other users who have commented on that issue. Since the oauth & gmail API stuff that the relay does is slow, this happens in a background thread. Change-Id: Ic00c265deab1030d9ba64c29c9f56314dd179141 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2805 Tested-by: BuildkiteCI Reviewed-by: sterni Reviewed-by: tazjin --- web/panettone/src/packages.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'web/panettone/src/packages.lisp') diff --git a/web/panettone/src/packages.lisp b/web/panettone/src/packages.lisp index 22a2a8649ac8..891a6a199521 100644 --- a/web/panettone/src/packages.lisp +++ b/web/panettone/src/packages.lisp @@ -32,7 +32,7 @@ (:use :cl :panettone.util :klatre :postmodern :iterate) (:import-from :alexandria :if-let :when-let :define-constant) (:export - :connect-postgres :ddl/init + :connect-postgres :ddl/init :make-thread :user-settings :user-dn :enable-email-notifications-p :settings-for-user @@ -46,7 +46,8 @@ :issue-events - :issue-comments :num-comments :create-issue-comment)) + :issue-comments :num-comments :create-issue-comment + :issue-commenter-dns)) (defpackage panettone.email (:nicknames :email) @@ -69,6 +70,7 @@ (:import-from :defclass-std :defclass/std) (:import-from :alexandria :if-let :when-let :switch :alist-hash-table) (:import-from :cl-ppcre :split) + (:import-from :bordeaux-threads :make-thread) (:import-from :panettone.model :id :subject :body :author-dn :issue-id :status :created-at -- cgit 1.4.1