diff --git a/CHANGES.md b/CHANGES.md index 04fd33dfd..a2cb4c73e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -65,6 +65,7 @@ - Fix unneeded popup when updating local components [Taiga #4430](https://tree.taiga.io/project/penpot/issue/4430) - Fix multiuser - "Shadow" element is not updating immediately [Taiga #4709](https://tree.taiga.io/project/penpot/issue/4709) - Fix paths not flagged as modified when resized [Taiga #4742](https://tree.taiga.io/project/penpot/issue/4742) +- Fix resend invitation doesn't reset the expiration date [Taiga #4741](https://tree.taiga.io/project/penpot/issue/4741) ### :heart: Community contributions by (Thank you!) diff --git a/backend/src/app/rpc/commands/teams.clj b/backend/src/app/rpc/commands/teams.clj index bf2346f2f..70c8101b8 100644 --- a/backend/src/app/rpc/commands/teams.clj +++ b/backend/src/app/rpc/commands/teams.clj @@ -641,7 +641,7 @@ "insert into team_invitation(team_id, email_to, role, valid_until) values (?, ?, ?, ?) on conflict(team_id, email_to) do - update set role = ?, updated_at = now();") + update set role = ?, valid_until = ?, updated_at = now();") (defn- create-invitation-token [cfg {:keys [profile-id valid-until team-id member-id member-email role]}] @@ -712,7 +712,7 @@ {:id (:id member)}))) (do (db/exec-one! conn [sql:upsert-team-invitation - (:id team) (str/lower email) (name role) expire (name role)]) + (:id team) (str/lower email) (name role) expire (name role) expire]) (eml/send! {::eml/conn conn ::eml/factory eml/invite-to-team :public-uri (cf/get :public-uri) diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index 1675b59cc..b1450a734 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -460,7 +460,8 @@ (mf/use-fn (fn [] (st/emit! (msg/success (tr "notifications.invitation-email-sent")) - (modal/hide)))) + (modal/hide) + (dd/fetch-team-invitations)))) on-copy-success (mf/use-fn