Skip to content

Commit

Permalink
Merge pull request #78 from Giveth/add-badge-revoke-events
Browse files Browse the repository at this point in the history
add badge revoke reminder events
  • Loading branch information
RamRamez authored Feb 29, 2024
2 parents 05a9322 + 997822e commit cb6dc6d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/services/notificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,22 @@ const activityCreator = (payload: any, orttoEventName: NOTIFICATIONS_EVENT_NAMES
"str:cm:verified-status": 'revoked',
}
break
case NOTIFICATIONS_EVENT_NAMES.PROJECT_BADGE_REVOKE_WARNING:
attributes = {
"str:cm:projecttitle": payload.title,
"str:cm:email": payload.email,
"str:cm:projectupdatelink": payload.projectLink + '?tab=updates',
"str:cm:user-id": payload.userId?.toString(),
}
break
case NOTIFICATIONS_EVENT_NAMES.PROJECT_BADGE_REVOKE_LAST_WARNING:
attributes = {
"str:cm:projecttitle": payload.title,
"str:cm:email": payload.email,
"str:cm:projectupdatelink": payload.projectLink + '?tab=updates',
"str:cm:user-id": payload.userId?.toString(),
}
break
default:
logger.debug('activityCreator() invalid event name', orttoEventName)
return;
Expand Down
2 changes: 2 additions & 0 deletions src/types/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ export const ORTTO_EVENT_NAMES = {
[NOTIFICATIONS_EVENT_NAMES.PROJECT_VERIFIED]: 'project-verification',
[NOTIFICATIONS_EVENT_NAMES.PROJECT_BADGE_REVOKED]: 'project-verification',
[NOTIFICATIONS_EVENT_NAMES.VERIFICATION_FORM_REJECTED]: 'project-verification',
[NOTIFICATIONS_EVENT_NAMES.PROJECT_BADGE_REVOKE_WARNING]: 'first-update-warning',
[NOTIFICATIONS_EVENT_NAMES.PROJECT_BADGE_REVOKE_LAST_WARNING]: 'second-update-warning',
}

0 comments on commit cb6dc6d

Please sign in to comment.