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
@ -89,6 +89,12 @@ module.exports = class MemberRepository {
|
||||
source = 'member';
|
||||
}
|
||||
|
||||
await this._MemberStatusEvent.add({
|
||||
member_id: member.id,
|
||||
from_status: null,
|
||||
to_status: member.get('status')
|
||||
}, options);
|
||||
|
||||
if (member.get('subscribed')) {
|
||||
await this._MemberSubscribeEvent.add({
|
||||
member_id: member.id,
|
||||
@ -97,12 +103,6 @@ module.exports = class MemberRepository {
|
||||
}, options);
|
||||
}
|
||||
|
||||
await this._MemberStatusEvent.add({
|
||||
member_id: member.id,
|
||||
from_status: null,
|
||||
to_status: member.get('status')
|
||||
}, options);
|
||||
|
||||
return member;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user