fix(xo-web/notifications): set cookie expiration date (#5067)
Without an expiration date, the cookie expires at the end of the session and read notifications are marked as unread the next time the user connects.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
- [Home] Broken "Import VM" link [#5055](https://github.com/vatesfr/xen-orchestra/issues/5055) (PR [#5056](https://github.com/vatesfr/xen-orchestra/pull/5056))
|
||||
- [Home/SR] Fix inability to edit SRs' name [#5057](https://github.com/vatesfr/xen-orchestra/issues/5057) (PR [#5058](https://github.com/vatesfr/xen-orchestra/pull/5058))
|
||||
- [Backup] Fix huge logs in case of Continuous Replication or Disaster Recovery errors (PR [#5069](https://github.com/vatesfr/xen-orchestra/pull/5069))
|
||||
- [Notification] Fix same notification showing again as unread (PR [#5067](https://github.com/vatesfr/xen-orchestra/pull/5067))
|
||||
|
||||
### Packages to release
|
||||
|
||||
@@ -39,3 +40,4 @@
|
||||
|
||||
- xo-server-load-balancer patch
|
||||
- xo-server patch
|
||||
- xo-web minor
|
||||
|
||||
@@ -372,7 +372,8 @@ const setNotificationCookie = (id, changes) => {
|
||||
})
|
||||
cookies.set(
|
||||
`notifications:${store.getState().user.id}`,
|
||||
JSON.stringify(notifications)
|
||||
JSON.stringify(notifications),
|
||||
{ expires: Infinity }
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user