-
Notifications
You must be signed in to change notification settings - Fork 211
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
Allow users to set their desired frequency of notifications (immediately, delayed, never) #344
Comments
PS - to make it clear: the system would wait until there is an unread followed post that is [desired-frequency] old, but then it would notifiy you about all the unread posts at that time. So you would only get max one email per [desired-frequency] |
Sounds good overall!
All the other settings have a global and per-messageboard version (that defaults to global unless explicitly set), so it would be nice to keep it consistent.
Would we schedule a job to happen [desired-frequency] from now? Care needs to be taken when a frequency is changed in the presence of pending jobs. |
Totally agree. On this front I wouldn't recommend adjusting, or canceling, or re-scheduling, existing jobs. I've been down this road before and it was less than fun. Messaging around this sort of change could be along the lines of "Future scheduled notifications will now adhere to your new frequency" ... or something like that. |
I agree with both of your reservations around rescheduling future scheduled jobs, but I hadn't yet begun to think about the implementation mechanism. Would like to think about other alternative implementations too. In any case, if future scheduled jobs were created, then they would have to check back to the db on their execution (are there any followed topics with still unread posts to notify about), at which point they may find that they are no longer valid and have to make a new scheduling. My gut feel is that it might be easier to do the scheduling the other way (ie. have a repeating scheduled task that looks for unread unnotified posts and checks if they should be notified).
Agreed with consistency in general, but it also needs to be coherent, and relatively straightforward to implement, and (if possible) extensible. I'd rather see a (real-world if possible) reason for the per-messageboard preference on this version (my usage of thredded doesn't have this) |
@glebm @jayroh Thinking a bit more about this implementation (the current option in my head, though the other alternative is setting future-timestamped scheduled jobs) , We could extend |
[EDITED to fill out and make clearer] Here's a bit more detail on planned implementation of the delayed (max once per hour) email. When I have "max once per hour" (delayed notifications) switched on, I receive "New message emails" as follows: An hour after a topic I follow has a new post:
Ditto for "a new topic which mentions me" NB: the delayed feature would cross messageboards, so I'm proposing not (at least initially) to do it with per-messageboard support: The idea here is that you receive a "Thredded updates" email at most once per hour ("things that have happened since you've been away") and that this includes everything that you haven't read online or been notified about already. The system would try to send this as late as possible, but aiming to get one per hour. Two different implementation plans in my head:
Commonalities of both implementation options
Collisions: In both of these implementation options, collisions (two tasks sending the same email) are possible. (I'm tempted by a slight future-proofing but I think I'm going to ignore because YAGNI, but noting here to remind myself is to say that users can be notified by different channels separately (e.g. push notification / Trello and email) so rather than User#notified_at should be looking at ChannelUserNotification#notified_at) In general I'm leaning towards the first option, as it seems clearer to me, and the parts are simpler, and also doesn't require the main app user to set up a cron (just an activejob handler, as currently). |
Having worked on this for a bit I think we're splitting this into two parts: Customizable Notifiers
Daily (or whatever) email updates of unread followed topics / unread private messages
I have split the first one off into a separate issue #441 |
I think notification frequency and grouping would be a useful feature in general (most mailing list software have this), but if no-one is planning to implement it in the foreseeable future let's close. |
The 'daily' updates (items not covered in the other issue) would presumably be something like a daily or weekly digest? I could see that being extremely valuable... Just adding my 0.02 :) |
@jayroh @glebm this (equivalent to #238) is on my hitlist -- will reopen it when I have a PR to offer. I'm thinking of a option which is: notify me by (notifier): never / immediately / at most once per hour / at most once per day (open to more but not to make it configurable (yet)) Do we have anything for/against "cronjobs" (by which I mean clock-based externally initiated tasks, not literally cron as a mechanism) -- we don't have any at present, so it does add one more task to the provisioner. But they will be cleaner to implement I think than future-scheduled jobs. The notifiers might need some configuration of what they notify with (depending on what they can notify with -- a push-based notifier can only do a message.).
However I might just do (These texts need tweaking to make localisation friendly). thoughts welcome! |
A periodic job does seem like a better fit here. We'd need to provide a method like |
@glebm can you use that rescue-scheduler file on heroku? |
Yes, it's easy on heroku, just add For the rake job, we could take the list of jobs from |
@jayroh @glebm As mentioned in #340 (comment) would like to be able to have a setting for (Email) Notification frequency of new unread posts.
Currently the frequency is "immediately"
But obvious alternative would be: "never".
Additionally would be nice to have some intermediate frequencies.
In the ideal the frequency options are configurable by site owner but for MVP might be easier to just have precanned options: after an hour, after 24 hours.
When one of the intermediate frequencies is chosen, you then get an email whenever you've got a new post in one of your followed topics which you haven't been notified about which is xxx hours old. But you only get one notification for a topic. (so it's a " new stuff" email, not a "posts you still haven't read" email). But in any case if you keep reading your stuff online you won't get a notification (which is good).
Quick check:
The text was updated successfully, but these errors were encountered: