0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-07 23:08:24 -05:00

💄 Remove redundant set conversions

This commit is contained in:
Andrey Antukh 2025-01-08 13:34:13 +01:00 committed by alonso.torres
parent 1f4fafe781
commit aa583b0707

View file

@ -90,23 +90,23 @@
;; Users mentioned in this comment ;; Users mentioned in this comment
comment-mentions comment-mentions
(-> (set (:mentions comment)) (-> (:mentions comment)
(set/difference #{profile-id})) (set/difference #{profile-id}))
;; Users mentioned in this thread ;; Users mentioned in this thread
thread-mentions thread-mentions
(-> (set (:mentions thread)) (-> (:mentions thread)
;; Remove the mentions in the thread because we're already sending a ;; Remove the mentions in the thread because we're already sending a
;; notification ;; notification
(set/difference comment-mentions) (set/difference comment-mentions)
(set/difference #{profile-id})) (disj profile-id))
;; All users ;; All users
notificate-users-ids notificate-users-ids
(-> (set (keys team-users)) (-> (set (keys team-users))
(set/difference comment-mentions) (set/difference comment-mentions)
(set/difference thread-mentions) (set/difference thread-mentions)
(set/difference #{profile-id}))] (disj profile-id))]
(doseq [mention comment-mentions] (doseq [mention comment-mentions]
(let [{:keys [fullname email mention-email?]} (get team-users mention)] (let [{:keys [fullname email mention-email?]} (get team-users mention)]
@ -154,7 +154,7 @@
(cond-> row (cond-> row
(db/pgpoint? position) (assoc :position (db/decode-pgpoint position)) (db/pgpoint? position) (assoc :position (db/decode-pgpoint position))
(db/pgobject? participants) (assoc :participants (db/decode-transit-pgobject participants)) (db/pgobject? participants) (assoc :participants (db/decode-transit-pgobject participants))
(db/pgarray? mentions) (assoc :mentions (db/decode-pgarray mentions)))) (db/pgarray? mentions) (assoc :mentions (db/decode-pgarray mentions #{}))))
(def xf-decode-row (def xf-decode-row
(map decode-row)) (map decode-row))