0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -05:00

🎉 Add the ability to disable mattermost webhook on runtime.

This commit is contained in:
Andrey Antukh 2021-02-01 22:36:23 +01:00
parent 948a4038c6
commit 8b9371d7e1

View file

@ -36,6 +36,7 @@
(declare handle-event)
(defonce enabled-mattermost (atom true))
(defonce queue (a/chan (a/sliding-buffer 64)))
(defonce queue-fn (fn [event] (a/>!! queue event)))
@ -117,7 +118,7 @@
[cfg event]
(try
(let [cdata (get-context-data event)]
(when (:uri cfg)
(when (and (:uri cfg) @enabled-mattermost)
(send-mattermost-notification! cfg cdata))
(persist-on-database! cfg cdata))
(catch Exception e