diff --git a/ghost/admin/app/helpers/members-event-fetcher.js b/ghost/admin/app/helpers/members-event-fetcher.js index 51e090e62c..e4fb450e67 100644 --- a/ghost/admin/app/helpers/members-event-fetcher.js +++ b/ghost/admin/app/helpers/members-event-fetcher.js @@ -114,23 +114,6 @@ export default class MembersEventsFetcher extends Resource { } this.data.push(...events); - - // todo: remove all condition block when backend will be ready - if (this.feature.suppressionList && !queryParams.filter.includes('email_delivered_event')) { - const memberId = this.args.named.memberId; - if (!this.args.named.memberId) { - return; - } - const member = yield this.store.findRecord('member', memberId); - if (member.email === 'spam@member.test') { - this.data.unshift(mockData('email_delivered_event')); - this.data.unshift(mockData('email_complaint_event')); - } - - if (member.email === 'fail@member.test') { - this.data.unshift(mockData('email_failed_event')); - } - } } catch (e) { this.isError = true; @@ -146,58 +129,3 @@ export default class MembersEventsFetcher extends Resource { } } } - -function mockData(eventType) { - return ({ - type: eventType, - data: { - id: '6375cc411ebedb499bef54c7', - member_id: '63737a1719675aed3b7cc988', - created_at: moment.utc(), - member: { - id: '63737a1719675aed3b7cc988', - uuid: '5c753e47-9f49-43ad-86d4-c5c0168519a2', - email: 'spam@member.test', - status: 'free', - name: 'Spam', - expertise: null, - note: null, - geolocation: null, - enable_comment_notifications: true, - email_count: 6, - email_opened_count: 2, - email_open_rate: 33, - last_seen_at: '2022-11-16T04:44:19.000Z', - last_commented_at: null, - created_at: '2022-11-15T11:37:59.000Z', - updated_at: '2022-11-17T05:33:13.000Z', - avatar_image: 'https://www.gravatar.com/avatar/0e0d23869265932bca724acda6c7e529?s=250&r=g&d=blank' - }, - email: { - id: '6375cc411ebedb499bef54c4', - post_id: '6375cc3e1ebedb499bef54b5', - uuid: '01f393bd-b487-4540-995f-d09ad47059d8', - status: 'submitted', - recipient_filter: 'all', - error: null, - error_data: '[]', - email_count: 2, - delivered_count: 2, - opened_count: 0, - failed_count: 0, - subject: 'Spam test', - from: '"local"', - reply_to: 'noreply@localhost', - html: '\n\n\n\n\n\n\nSpam test\n\n\n\n\n \n \n\n \n \n\n \n \n \n \n \n\n \n\n \n\n\n', - plaintext: null, - track_opens: true, - track_clicks: true, - submitted_at: '2022-11-17T05:53:05.000Z', - newsletter_id: '123', - created_at: '2022-11-17T05:53:05.000Z', - updated_at: '2022-11-17T05:53:07.000Z', - feedback_enabled: true - } - } - }); -}