mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated status events to happen before subscribed events
no-issue Given that status events are used to determine signup events, they should be the first event for a member.
This commit is contained in:
parent
58c9c1c649
commit
d662003fdb
1 changed files with 6 additions and 6 deletions
|
@ -89,6 +89,12 @@ module.exports = class MemberRepository {
|
||||||
source = 'member';
|
source = 'member';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await this._MemberStatusEvent.add({
|
||||||
|
member_id: member.id,
|
||||||
|
from_status: null,
|
||||||
|
to_status: member.get('status')
|
||||||
|
}, options);
|
||||||
|
|
||||||
if (member.get('subscribed')) {
|
if (member.get('subscribed')) {
|
||||||
await this._MemberSubscribeEvent.add({
|
await this._MemberSubscribeEvent.add({
|
||||||
member_id: member.id,
|
member_id: member.id,
|
||||||
|
@ -97,12 +103,6 @@ module.exports = class MemberRepository {
|
||||||
}, options);
|
}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this._MemberStatusEvent.add({
|
|
||||||
member_id: member.id,
|
|
||||||
from_status: null,
|
|
||||||
to_status: member.get('status')
|
|
||||||
}, options);
|
|
||||||
|
|
||||||
return member;
|
return member;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue