Ghost/ghost/webmentions/lib/MentionCreatedEvent.js
Ronald Langeveld dd74f42376
Added mentions email notifications (#16170)
closes https://github.com/TryGhost/Team/issues/2429

- sends email notifications to staff users when their site receives a Webmention.
- currently behind a flag, that can be toggled in the labs settings.
2023-01-25 21:10:29 +08:00

23 lines
504 B
JavaScript

/**
* @typedef {object} MentionCreatedEventData
*/
module.exports = class MentionCreatedEvent {
/**
* @param {MentionCreatedEventData} data
* @param {Date} timestamp
*/
constructor(data, timestamp) {
this.data = data;
this.timestamp = timestamp;
}
/**
* @param {MentionCreatedEventData} data
* @param {Date} [timestamp]
*/
static create(data, timestamp) {
return new MentionCreatedEvent(data, timestamp ?? new Date);
}
};