Skip to content

Commit

Permalink
fix new content notification
Browse files Browse the repository at this point in the history
  • Loading branch information
ginesdt committed Dec 11, 2023
1 parent e74a095 commit 2396d14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/streamtide/server/notifiers/notifiers.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
:notification/enable true})]
(notify-all-types notification-entries notification)))

(defn notify-new-content [{:keys [:user/address :user/name] :as creator}]
(defn notify-new-content [{:keys [:user/address] :as creator}]
"Sends a notification to the supported of a creator when there is new content"
(let [notification {:title "New content from supported patron"
:body (gstring/format "The creator you support \"%s\" has added new content" name)}
:body (gstring/format "The creator you support \"%s\" has added new content" (:user/name creator))}

addresses (map :user/source-user (stdb/get-user-content-permissions {:user/target-user address}))
enabled-notifications (stdb/get-notification-categories {:user/addresses addresses
:notification/category (name :notification-category/patron-publications)
Expand Down

0 comments on commit 2396d14

Please sign in to comment.