mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 18:56:38 +02:00
🐛 Fix sending invitation to existing members
This commit is contained in:
parent
1f9e7f2ae8
commit
4313c45870
2 changed files with 10 additions and 2 deletions
|
@ -729,8 +729,13 @@
|
|||
(let [perms (get-permissions conn profile-id team-id)
|
||||
profile (db/get-by-id conn :profile profile-id)
|
||||
team (db/get-by-id conn :team team-id)
|
||||
emails (cond-> (or emails #{}) (string? email) (conj email))]
|
||||
|
||||
;; Members emails. We don't re-send inviation to already existing members
|
||||
member? (into #{}
|
||||
(map :email)
|
||||
(db/exec! conn [sql:team-members team-id]))
|
||||
|
||||
emails (cond-> (or emails #{}) (string? email) (conj email))]
|
||||
|
||||
(run! (partial quotes/check-quote! conn)
|
||||
(list {::quotes/id ::quotes/invitations-per-team
|
||||
|
@ -754,6 +759,7 @@
|
|||
|
||||
(let [cfg (assoc cfg ::db/conn conn)
|
||||
invitations (->> emails
|
||||
(remove member?)
|
||||
(map (fn [email]
|
||||
{:email (str/lower email)
|
||||
:team team
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue