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:
parent
948a4038c6
commit
8b9371d7e1
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue