Skip to content

Commit 0aa8ccc

Browse files
committed
New Rejected Mailing List
1 parent 076b44e commit 0aa8ccc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/tasks/mailSync.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const requiredListsGlobal = ['DMUN_NEWSLETTER', 'DMUN_TEAM_TENDERS'];
2828
const requiredListsPerConference = [
2929
'REGISTRATION_NOT_COMPLETED',
3030
'REGISTRATION_COMPLETED',
31+
'REJECTED_PARTICIPANTS',
3132
'DELEGATION_MEMBERS_NATIONS',
3233
'DELEGATION_MEMBERS_NSA',
3334
'SINGLE_PARTICIPANTS',
@@ -291,6 +292,17 @@ function constructSubscriberObjectFromUser(user: User): SubscriberObj {
291292
) {
292293
lists.push(createListName(dm.delegation.conference.title, dm.conferenceId, 'HEAD_DELEGATES'));
293294
}
295+
296+
if (
297+
dm.delegation.conference.state !== 'PARTICIPANT_REGISTRATION' &&
298+
!dm.delegation.assignedNationAlpha3Code &&
299+
!dm.delegation.assignedNonStateActorId
300+
) {
301+
lists.push(
302+
createListName(dm.delegation.conference.title, dm.conferenceId, 'REJECTED_PARTICIPANTS')
303+
);
304+
}
305+
294306
if (dm.delegation.applied) {
295307
lists.push(
296308
createListName(dm.delegation.conference.title, dm.conferenceId, 'REGISTRATION_COMPLETED')
@@ -312,9 +324,13 @@ function constructSubscriberObjectFromUser(user: User): SubscriberObj {
312324
role: 'SINGLE_PARTICIPANT',
313325
title: sp.conference.title
314326
});
327+
315328
if (sp.assignedRoleId) {
316329
lists.push(createListName(sp.conference.title, sp.conferenceId, 'SINGLE_PARTICIPANTS'));
330+
} else if (sp.conference.state !== 'PARTICIPANT_REGISTRATION') {
331+
lists.push(createListName(sp.conference.title, sp.conferenceId, 'REJECTED_PARTICIPANTS'));
317332
}
333+
318334
if (sp.applied) {
319335
lists.push(createListName(sp.conference.title, sp.conferenceId, 'REGISTRATION_COMPLETED'));
320336
} else {

0 commit comments

Comments
 (0)