hackclub / hackathons-backend

Powering https://hackathons.hackclub.com

Home Page:https://hackathons.hackclub.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discuss evolving `Hackathon::Subscription`

northeastprince opened this issue · comments

Right now, a Hackathon::Subscription ties a subscriber to an area they wanna receive hackathon digests for. But it doesn't seem that way when you look at it. Since we want to have notifications for admins and organizers for pertinent submissions and/or their updates, I think a general polymorphic Subscription model could be handy.

That leaves the more specific Hackathon::Subscription in a bit of a tough spot. I think we should refactor it to something like a Hackathon::Regional::Subscription, but it's closely coupled to the complex Hackathon::Digest system so that might make it even more confusing.

I'd love to get some input on this!

I don't find the need for a model to handle status update notifications. Could you explain more about what the polymorphic Subscription model would do?

Also, I'm in favor of keeping Hackathon::Subscription as is because the primary purpose of this application is to notify subscribers based on geographic regions. We don't have a use case for any other type of hackathon subscription, and likely won't in the future.

I was thinking we could have that model so that admins could have a choice whether to be notified or not, but now that I think about it, we can just have that as a user-level option for admins.