mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Added createdAtVersion property to newly created notifications
refs https://linear.app/tryghost/issue/CORE-64/resolve-undissmissable-update-notification-banners - The property is meant to track Ghost instance version the notification was received and processed at. - This information should be useful in the future to dismiss outdated notifications
This commit is contained in:
parent
53ae852a0e
commit
8737ec8888
@ -19,6 +19,7 @@ module.exports = {
|
||||
delete notification.seen;
|
||||
delete notification.seenBy;
|
||||
delete notification.addedAt;
|
||||
delete notification.createdAtVersion;
|
||||
});
|
||||
|
||||
frame.response = {
|
||||
|
@ -19,6 +19,7 @@ module.exports = {
|
||||
delete notification.seen;
|
||||
delete notification.seenBy;
|
||||
delete notification.addedAt;
|
||||
delete notification.createdAtVersion;
|
||||
});
|
||||
|
||||
frame.response = {
|
||||
|
@ -19,6 +19,7 @@ module.exports = {
|
||||
delete notification.seen;
|
||||
delete notification.seenBy;
|
||||
delete notification.addedAt;
|
||||
delete notification.createdAtVersion;
|
||||
});
|
||||
|
||||
frame.response = {
|
||||
|
@ -123,7 +123,8 @@ class Notifications {
|
||||
dismissible: true,
|
||||
location: 'bottom',
|
||||
status: 'alert',
|
||||
id: ObjectId().toHexString()
|
||||
id: ObjectId().toHexString(),
|
||||
createdAtVersion: this.ghostVersion.full
|
||||
};
|
||||
|
||||
const overrides = {
|
||||
|
@ -194,6 +194,7 @@ describe('Notifications Service', function () {
|
||||
createdNotification.dismissible.should.be.false();
|
||||
createdNotification.top.should.be.true();
|
||||
createdNotification.message.should.equal('Hello test world!');
|
||||
createdNotification.createdAtVersion.should.equal('4.1.0');
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user