Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grace period emails seem to be resending occasionally #122

Open
dfirebaugh opened this issue Aug 23, 2021 · 2 comments
Open

grace period emails seem to be resending occasionally #122

dfirebaugh opened this issue Aug 23, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dfirebaugh
Copy link
Member

This could be related or simlar to #108

@dfirebaugh dfirebaugh added bug Something isn't working help wanted Extra attention is needed labels Aug 23, 2021
@Athulus
Copy link

Athulus commented Aug 24, 2021

it looks like the grace period email will resend every day between grace period start and the membership changing to inactive. does that look right to you @dfirebaugh ?

this runs every 25 hours 👇

               if a.DaysSinceLastPayment > memberGracePeriod {
			mailer.SendCommunication(mail.AccessRevokedLeadership, c.AdminEmail, a)
			mailer.SendCommunication(mail.AccessRevokedMember, a.Email, a)
			db.SetMemberLevel(a.MemberId, models.Inactive)
		} else if a.DaysSinceLastPayment > membershipMonth {
			if !mailer.IsThrottled(pendingRevokation, models.Member{ID: a.MemberId}) {
				//TODO: [ML] Does it make sense to send this to leadership?  It might be like spam...
				mailer.SendCommunication(mail.PendingRevokationLeadership, c.AdminEmail, a)
				mailer.SendCommunication(mail.PendingRevokationMember, a.Email, a)
			}
		}

I was thinking that adding a boolean field to the getPastDuePayments query that tracks if they have been sent a grace period email would work. That would require adding that boolean field to the member table. We would have to set the flag after the PendingRevokationMember email is sent and clear that flag on payment received.

how does that sound?

@dfirebaugh
Copy link
Member Author

That sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants