Commit Graph

27 Commits

Author SHA1 Message Date
Sam b998efdc94 FIX: do not send mailing list emails to unapproved users 2017-12-13 15:13:17 +11:00
Robin Ward 1f14350220 Rename "Blocked" to "Silenced" 2017-11-10 14:10:27 -05:00
Guo Xiang Tan 4ba5e678d8 Require dependencies to enable live reload in dev for Sidekiq. 2017-10-06 11:39:00 +08:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Leo McArdle ddc0134b48 add DiscourseEvent triggers necessary to update a user's permissions before they're notified 2017-07-21 11:03:54 -04:00
Robin Ward 4f6e5fed2a We don't need to raise an error when no post is present. Just noop. 2017-05-08 15:08:29 -04:00
Guo Xiang Tan 50c8ae2c10 Load user records in batches. 2017-05-05 10:57:31 +08:00
Régis Hanol 664feca199 FIX: don't send emails from muted users in mailing list mode 2016-12-12 15:28:26 +01:00
Kiril Staikov aee943486a FEATURE:'No Echo' option for mailing list mode.
Mailing list mode now includes the 'no echo' option: to only receive emails of posts not created
by you.  If you reply to an email thread in mailing list mode, your reply will not then be echoed
back to you in a duplicate email by the system.
2016-10-19 13:14:36 -04:00
Régis Hanol 17890f95a1 FIX: don't send emails to mailing_list users when bounce threshold is reached 2016-07-05 12:20:07 +02:00
Régis Hanol 76766a25bf FIX: wrong translation key 2016-06-28 17:22:34 +02:00
James Kiesel feffe23cc5 FEATURE: More granular mailing list mode (#4068)
* Rearrange frontend to account for mailing list mode

* Allow update of user preference for mailing list frequency

* Add mailing list frequency estimate

* Simplify frequency estimate; disable activity summary for mailing list mode

* Remove combined updates

* Add specs for enqueue mailing list mode job

* Write mailing list method for mailer

* Fix linting error

* Account for stale topics

* Add translations for default mailing list setting

* One query for mailing list topics

* Fix failing spec

* WIP

* Flesh out html template

* First pass at text-based mailing list summary

* Add user avatar

* Properly format posts for mailing list

* Move make_all_links_absolute into Email::Styles

* Apply first_seen_at to user

* Send mailing list email summary hourly based on first_seen_at

* Branch and test cleanup

* Use existing mailing list mode estimate

* Fix failing specs
2016-05-21 15:17:54 +02:00
Sam 0119a2f980 FIX: only ever send users 1 email per post
in the past ninja editing a post to add a mention could trigger duplicate
emails to a user (and a few other edge cases)
2016-04-15 15:59:01 +10:00
Sam 8ec7fd84fd FEATURE: prioritize sidekiq jobs
This commit introduces 3 queues for sidekiq

"critical" for urgent jobs (weighted at 4x weight)
"default" for standard jobs(weighted at 2x weight)
"low" for less important jobs


"critical jobs"

Reset Password emails has been seperated to its own job
Heartbeat which is required to keep sidekiq running
Test email which needs to return real quick


"low priority jobs"

Notify mailing list
Pull hotlinked images
Update gravatar

"default"

All the rest

Note: for people running sidekiq from command line use

bin/sidekiq -q critical,4 -q default,2 -q low
2016-04-07 12:56:43 +10:00
Sam c095304d6d FEATURE: limit daily emails per user to 100 per day via site setting
- controlled via max_emails_per_day_per_user, 0 to disable
- when limit is reached user is warned
2016-03-23 15:08:48 +11:00
Sam a202ec2028 don't run mailing list if mailing list mode is disabled 2016-03-22 14:50:35 +11:00
Sam 3829c78526 PERF: shift most user options out of the user table
As it stands we load up user records quite frequently on the topic pages,
this in turn pulls all the columns for the users being selected, just to
discard them after they are loaded

New structure keeps all options in a discrete table, this is better organised
and allows us to easily add more column without worrying about bloating the
user table
2016-02-17 18:08:25 +11:00
Régis Hanol 7d992cb4c5 FIX: sending emails to mailing list subscribers wasn't working 2016-02-03 19:27:58 +01:00
riking 5657006aca Rename handle_exception to handle_job_exception 2015-02-09 12:47:46 -08:00
Robin Ward 17b6d3a2fe FIX: Mailing list mode was not checking for user deleted posts 2014-11-24 11:43:40 -05:00
riking 54484ca18a "FIX": Add error reporting to NotifyMailingListSubscribers
Also skip unactivated users, which may actually fix this
2014-09-03 14:53:05 -07:00
Sam b329e23f85 don't attempt to send emails on deleted topics 2014-05-14 10:34:28 +10:00
Louis Rose 1574485443 Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
2014-05-06 14:41:59 +01:00
Neil Lalonde d8ebeef857 FIX: NotifyMailingListSubscribers can handle trashed posts, instead of raising an error and retrying 2014-04-23 15:50:52 -04:00
Sam 56e09802fe BUGFIX: Use email sender 2014-02-09 07:29:16 +11:00
Sam e133c82d4b SECURITY: check permissions for mailing list
if you deployed this feature in the last 2 hours upgrade asap.
2014-02-07 14:10:45 +11:00
Sam 227873df78 FEATURE: proper mailing list mode
once enable_mailing_list_mode is enabled any user can elect
to get every post via email unless they opt out of category or topic
2014-02-07 11:07:52 +11:00