mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
🐛 Fixed the email recipient events in getEventTimeline
refs https://github.com/TryGhost/Team/issues/1277 - The members weren't included in the serialized version of the new events - Some properties weren't using the bookshelf `get` method as they should have
This commit is contained in:
parent
182a5ed993
commit
83fe60cb66
@ -123,7 +123,8 @@ module.exports = class EventRepository {
|
||||
data: {
|
||||
member_id: data.get('member_id'),
|
||||
created_at: data.get('delivered_at'),
|
||||
email_id: data.get('email_id')
|
||||
email_id: data.get('email_id'),
|
||||
member: data.related('member').toJSON()
|
||||
}
|
||||
};
|
||||
});
|
||||
@ -145,9 +146,10 @@ module.exports = class EventRepository {
|
||||
return {
|
||||
type: 'email_opened_event',
|
||||
data: {
|
||||
member_id: data.member_id,
|
||||
created_at: data.opened_at,
|
||||
email_id: data.email_id
|
||||
member_id: data.get('member_id'),
|
||||
created_at: data.get('opened_at'),
|
||||
email_id: data.get('email_id'),
|
||||
member: data.related('member').toJSON()
|
||||
}
|
||||
};
|
||||
});
|
||||
@ -169,9 +171,10 @@ module.exports = class EventRepository {
|
||||
return {
|
||||
type: 'email_failed_event',
|
||||
data: {
|
||||
member_id: data.member_id,
|
||||
created_at: data.failed_at,
|
||||
email_id: data.email_id
|
||||
member_id: data.get('member_id'),
|
||||
created_at: data.get('failed_at'),
|
||||
email_id: data.get('email_id'),
|
||||
member: data.related('member').toJSON()
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user