Commit Graph

340 Commits

Author SHA1 Message Date
Neil Lalonde
16fe7aa307 FEATURE: automatically handle flags and posts that have been waiting in a queue for a long time. Flags will be deferred. Posts waiting for approval will be rejected. Control how old the records need to be with the auto_handle_queued_age site setting. 2017-09-14 12:01:06 -04:00
Neil Lalonde
beea5cac48 FIX: send the queued posts reminder as a message to moderators instead of an email to the contact_email 2017-09-12 18:00:51 -04:00
Neil Lalonde
2c56f8df7c FEATURE: show tags in search results 2017-08-25 11:52:59 -04:00
Sam Saffron
56f7b4e01e PERF: reindex search data without loading large post counts 2017-08-16 08:18:59 -04:00
Erick Guan
6e59149a77 FIX: rebuild index when engine replaced (#5021) 2017-08-16 07:38:34 -04:00
Leo McArdle
836dee1120 FIX: add additional email to tests and clean up resulting mess 2017-07-31 22:27:29 +00:00
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Robin Ward
6b6ad9391b Clean up job for search logs 2017-07-14 14:30:58 -04:00
Guo Xiang Tan
1ab60d83df PERF: Terminate scheduled job earlier if badge is not enabled. 2017-06-26 10:13:58 +09:00
Guo Xiang Tan
6cc174ca82 PERF: Fetch users in batches in grant anniversary badge job. 2017-06-23 16:54:35 +09:00
Robin Ward
d92c938491 FIX: Don't raise an error cleaning up uploads if a path is nil 2017-06-08 14:31:58 -04:00
Régis Hanol
e8f0771dc9 FIX: the 'clean_up_uploads' jobs would delete images used in site settings
when they were entered using absolute URLs, with the CDN or simple a different format than the one used in the database
2017-06-07 22:53:15 +02:00
Sam
0aed2533ac Revert unread optimisation, has too many edge cases 2017-05-26 09:04:13 -04:00
Sam
29fac1ac18 PERF: improve performance of unread queries
Figuring out what unread topics a user has is a very expensive
operation over time.

Users can easily accumulate 10s of thousands of tracking state rows
(1 for every topic they ever visit)

When figuring out what a user has that is unread we need to join
the tracking state records to the topic table. This can very quickly
lead to cases where you need to scan through the entire topic table.

This commit optimises it so we always keep track of the "first" date
a user has unread topics. Then we can easily filter out all earlier
topics from the join.

We use pg functions, instead of nested queries here to assist the
planner.
2017-05-25 15:07:30 -04:00
Robin Ward
b78b010757 FIX: Fixes to grant new user of the month badge 2017-05-24 11:36:24 -04:00
Neil Lalonde
9edc490d3f FIX: remove memoized values in jobs 2017-05-22 16:26:30 -04:00
Neil Lalonde
f350dd4fd1 FIX: possible data leaking from one site to another in multisite in PendingFlagsReminder 2017-05-22 15:18:13 -04:00
Robin Ward
bd0bb879e5 FIX: Don't count likes from system users in the new user of the month 2017-05-15 13:14:32 -04:00
Neil Lalonde
55b61e9bea rename topic_status_update to topic_timer 2017-05-11 18:27:53 -04:00
Robin Ward
3ade46de0b FIX: Don't send system message for new user of the month if disabled 2017-05-11 11:33:16 -04:00
Sam
f709899a1d Allow theme field object model to support uploads 2017-05-10 15:46:42 -04:00
Robin Ward
4db76796b9 FEATURE: Setting to poll feeds more frequently 2017-05-10 14:30:12 -04:00
Robin Ward
6e4ba8a33e Catch RSS Parsing errors 2017-05-09 15:07:06 -04:00
Guo Xiang Tan
71a266b673 Remove daily mailing mode option as it doesn't scale.
https://meta.discourse.org/t/daily-updates-option-for-mailing-list-mode/45029/14?u=tgxworld
2017-05-05 12:21:50 +08:00
Neil Lalonde
ca224ed8e9 FIX: pending flags message should go to moderators group, not staff 2017-05-01 14:53:16 -04:00
Robin Ward
f05f1a24d3 Change Anniversary badge to be multiple grant, once per year 2017-04-28 14:22:54 -04:00
Guo Xiang Tan
85d9342ff0 Merge pull request #4836 from tgxworld/fix_clean_up_staged_users_job
FIX: Clean up unused staged users job not completing.
2017-04-27 15:41:46 +08:00
Robin Ward
bf9c4a7828 FEATURE: secure_email site setting to prevent data going out in email 2017-04-26 13:05:56 -04:00
Guo Xiang Tan
daa97c40ce FIX: Clean up unused staged users job not completing. 2017-04-26 10:51:36 +08:00
Neil Lalonde
05efa7ce68 simplify last_notified_id 2017-04-20 15:26:28 -04:00
Neil Lalonde
3835e16cf7 FIX: New implementation of the "notify about flag after" setting. Only notify about new flags since the last notification. Send a private message to staff. Mention the 3 most active moderators in the message so they get notification emails. 2017-04-19 16:17:45 -04:00
Guo Xiang Tan
5943543ec3 FIX: Improve checks for non-human users. 2017-04-06 11:29:34 +08:00
Robin Ward
ebe232da47 Weigh staff votes more for New User of the Month badges 2017-04-03 16:52:31 -04:00
Robin Ward
a13a8dc96c FIX: Safeguard to not award NewUserOfTheMonth if it hasn't been a month 2017-04-03 13:26:51 -04:00
Robin Ward
3d64f33d40 Require at least two likes to get the "New User of the Month" badge 2017-04-03 13:03:28 -04:00
Jeff Atwood
3b64aeaf21 loosen new user of the month criteria slightly 2017-03-31 16:33:50 -07:00
Robin Ward
e4b1376146 Change New User of the Month Badge to use trust level rather than age 2017-03-31 16:56:58 -04:00
Robin Ward
a8d3779f0b Update New User of the Month badge to require 4 posts in 2 topics 2017-03-31 16:52:00 -04:00
Robin Ward
fc7fa4c0ad Rename "Rookie of the Month" to "New User of the Month" 2017-03-31 16:30:30 -04:00
Robin Ward
e6f6bd34d8 Send the user a notice when they've received rookie of the month 2017-03-31 15:06:31 -04:00
Robin Ward
893e93dfbe New badge, Rookie of the Month, for two new high quality users. 2017-03-31 15:06:31 -04:00
Guo Xiang Tan
34b7bee568 FEATURE: Allow admin to auto reopen at topic.
* This commit also introduces a `TopicStatusUpdate`
  model to support other forms of deferred topic
  status update in the future.
2017-03-31 11:14:18 +08:00
Guo Xiang Tan
1a7e954e09 FIX: Store custom emojis as uploads.
* Depending on a hardcoded directory was a flawed design
  which made it impossible to debug when custom emojis go
  missing.
2017-03-14 13:07:18 +08:00
Régis Hanol
23b06d2895 FIX: should not try to send digest to users who reached the bounce threshold 2017-03-08 19:19:11 +01:00
Blake Erickson
0a41da6bad FEATURE: Add order logic to admin users controller
Added order and direction parameters for sorting admin user pages. This
commit only includes backend api changes.

https://meta.discourse.org/t/make-admin-users-list-sortable-suggestion/47649

Now you can pass in `order` and `asc` parameters to the
`/admin/users/list/<query>.json` endpoint.

Example:

`/admin/users/list/active.json?&order=post_count` which defaults to desc

and

`/admin/users/list/active.json?order=post_count&asc=true`
2017-02-24 17:11:17 -07:00
Régis Hanol
f07b4b310a should not have renamed this setting in 460665895c 2017-02-08 18:11:34 +01:00
Sam
ff49f72ad9 FEATURE: per client user tokens
Revamped system for managing authentication tokens.

- Every user has 1 token per client (web browser)
- Tokens are rotated every 10 minutes

New system migrates the old tokens to "legacy" tokens,
so users still remain logged on.

Also introduces weekly job to expire old auth tokens.
2017-02-07 09:22:16 -05: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
Guo Xiang Tan
9a800107cb FIX: Associate category logo and background to uploads record. 2016-12-12 17:37:28 +08:00
Robin Ward
424fc8e2e2 FIX: Don't raise an error if the RSS endpoint is 404 2016-12-05 12:29:14 -05:00
Guo Xiang Tan
55b35a05ed FIX: This should not have been checked in. 2016-12-05 11:49:04 +08:00
Guo Xiang Tan
22059d4df9 Add Rake task to clean up unused multisite Redis keys. 2016-12-05 11:46:34 +08:00
Andreas Motl
43fd3ebd4a Add “pop3_polling_openssl_verify” setting to turn off TLS server certificate verification like “smtp_openssl_verify_mode”. Defaults to “true”, so it does not change current behavior. 2016-11-11 21:59:15 +01:00
Guo Xiang Tan
f03d9cad06 PERF: NOT IN query is really inefficient for large tables. 2016-11-02 13:09:18 +08:00
Régis Hanol
52b338db62 FIX: category logo & background URLs should not use the CDN 2016-10-25 10:43:57 +02:00
Robin Ward
af83c8dc14 Upload Logos Step 2016-09-22 09:52:19 -04:00
Guo Xiang Tan
baacb30ba1 FIX: Incorrect folder. 2016-09-15 15:20:07 +08:00
Matt Palmer
394cd43d77 Scrub only after converting strings to UTF-8
Scrubbing an ASCII-8BIT string isn't ever going to remove anything, because
there's no code point that isn't valid 8-bit ASCII.  Since we'd really
prefer it if everything were UTF-8 anyway, we'll just assume, for now, that
whatever comes out of SimpleRSS is probably UTF-8, and just nuke anything
that isn't a valid UTF-8 codepoint.

Of course, the *real* bug here is that SimpleRSS [unilaterally converts
everything to
ASCII-8BIT](https://github.com/cardmagic/simple-rss/issues/15).  It's
presumably *far* too much to ask that it detects the encoding of the source
RSS feed and marks the parsed strings with the correct encoding...
2016-08-25 16:09:07 +10:00
Arpit Jalan
a2220feaea FEATURE: new site setting rebake_old_posts_count 2016-08-15 16:34:13 +05:30
Arpit Jalan
c064e946b2 FIX: custom reason for flags were not showing for non-english locales 2016-08-05 18:41:11 +05:30
Régis Hanol
c591429868 FIX: don't destroy uploads in queued posts and drafts 2016-08-01 18:35:57 +02:00
Sam
12dc511fea PERF: make score calculator cheaper when site has long topics 2016-07-22 09:48:44 +10:00
Guo Xiang Tan
1ea1cefb35 Extract Nginx log analyzer into a plugin that ships with Discourse. 2016-07-19 15:44:00 +08:00
Guo Xiang Tan
bd07658a37
PERF: Split queries when cleaning uploads.
This reduces the number of scans that the db has to do in the query
to fetch orphan uploads. Futheremore, we were not batching our
records which bloats memory.
2016-07-04 16:34:32 +08:00
Régis Hanol
2ecd0da59f REFACTOR: use same code path for handling emails via API and POP 2016-06-22 15:50:49 +02:00
Régis Hanol
e9a293beeb FIX: clean up uploads job 2016-06-20 22:05:41 +02:00
Sam
852860de66 FEATURE: simpler and friendlier unsubscribe workflow
- All unsubscribes go to the exact same page
- You may unsubscribe from watching a category on that page
- You no longer need to be logged in to unsubscribe from a topic
- Simplified footer on emails
2016-06-17 11:28:49 +10:00
Sam
c9dcffe434 FEATURE: store history for scheduled job execution 2016-05-30 11:38:08 +10: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 Saffron
ce5867cce2 workaround issue where orphan user_avatar record exists 2016-05-17 09:40:17 +10:00
Régis Hanol
3df8f184c3 FEATURE: clean up 1 year old and unused staged users 2016-05-16 22:13:23 +02:00
Régis Hanol
21ce674546 fix translation when receiving a bounce or an auto-reply 2016-05-16 08:42:30 +02:00
Régis Hanol
1e57bbf5c8 Lots bounce emails related fixes
- Show bounce score on user admin page
- Added reset bounce score button on user admin page
- Only whitelisted email types are sent to emails with high bounce score
- FIX: properly detect bounces even when there is no TO: header in the email
- Don't desactivate a user when reaching the bounce threshold
2016-05-06 19:34:33 +02:00
Arpit Jalan
9427e0c732 FIX: bootstrap mode should not amend setting that is not in default state 2016-05-04 16:46:46 +05:30
Régis Hanol
8e611ec7a1 FEATURE: handle bounced emails 2016-05-02 23:15:32 +02:00
Arpit Jalan
74b3807f60 FEATURE: new bootstrap mode settings for brand new Discourse community (#4193)
* FEATURE: new bootstrap mode settings for brand new Discourse community

* new SiteSetting.set_and_log method
2016-04-26 13:08:19 -04:00
Guo Xiang Tan
a556d9ad4e
FIX: Expiry should be 3 times polling interval. 2016-04-21 15:04:03 +08:00
Guo Xiang Tan
b4e0c5afe0
FIX: Fetch stats if it has not been cached. 2016-04-21 14:50:25 +08:00
Régis Hanol
7d9f2265b9 FIX: improve support for handling emails coming from screened email addresses 2016-04-18 23:01:54 +02:00
Guo Xiang Tan
f95cefd09a FEATURE: Add POP3 timeout error only after 3 failures in a row. 2016-04-14 08:55:19 +08:00
Régis Hanol
8fcd359e2a Revert "FIX: Jobs.cancel_scheduled_job wasn't working anymore due to our move to using multiple queues"
This reverts commit b7c16991f7.
2016-04-13 18:30:25 +02:00
Régis Hanol
b7c16991f7 FIX: Jobs.cancel_scheduled_job wasn't working anymore due to our move to using multiple queues
FIX: Don't queue more than 1 'update_gravatar' job per user
2016-04-13 18:12:28 +02:00
Régis Hanol
4d9c81fde7 Merge pull request #4148 from tgxworld/dont_reply_to_emails_that_are_autogenerated
FIX: Don't send rejection mailer to bounced emails.
2016-04-13 15:36:14 +02:00
Neil Lalonde
7f0b1691c4 FEATURE: add pop3 timeouts and auth errors to admin dashboard. Admins will get notified along with other problems. 2016-04-08 17:33:47 -04:00
Neil Lalonde
9c934e27be FEATURE: notify admins if problems have been reported on the dashboard for a while 2016-04-08 16:44:13 -04:00
Robin Ward
9d8db11cf3 Move MigrateScheme to new Onceoff thing 2016-04-07 15:31:32 -04:00
Robin Ward
3f7ced9236 Try running once off jobs outside of db:migrate 2016-04-07 15:07:24 -04:00
Guo Xiang Tan
5734c7f3f3 FIX: Don't send rejection mailer to bounced emails. 2016-04-07 22:21:17 +08:00
Régis Hanol
79639e2dec FIX: ensure group's users counters are kept in sync 2016-04-04 17:03:18 +02:00
Régis Hanol
9e9c81c30b improve error log when timing out while connecting to mail server 2016-03-25 16:44:08 +01:00
Régis Hanol
39863953cd new 'enable_staged_users' site setting 2016-03-23 18:56:03 +01:00
Régis Hanol
9c61f45bf9 FIX: properly handle failure in poll mailbox job 2016-03-21 18:49:01 +01:00
Sam Saffron
433fa74d87 FIX: ensure consistency of user options
Edge case during upgrade can cause accounts registered after migration
prior to restart to have missing user option records
2016-03-17 10:03:56 +11:00
Régis Hanol
162fcb75da FEATURE: admin dashboard check when email polling errored in the past 24 hours 2016-03-16 21:17:48 +01:00
Régis Hanol
4a3cb4a000 FIX: use MD5 of the email_string when there's no 'Message-Id' 2016-03-14 18:18:58 +01:00
Régis Hanol
622d804d46 FEATURE: Add rejection message on rejected IncomingEmail
FIX: Better RateLimit description in rejected IncomingEmail
FEATURE: Send email when hitting a rate limit
2016-03-07 16:56:17 +01:00
Guo Xiang Tan
bc4087b9bb FIX: RSS description might be nil. 2016-03-07 17:42:17 +08:00
Régis Hanol
05f0db0a20 FIX: don't use destroy_all when delete_all is enough 2016-03-05 00:41:22 +01:00
Neil Lalonde
c1aea91d63 FEATURE: More digest email frequency options. Digests can be sent as often as every 30 minutes. 2016-03-02 15:43:47 -05:00
Neil Lalonde
e8d837269b FEATURE: pending flags reminder is sent as a group message to staff instead of sending an email to the contact email site setting. 2016-02-19 15:21:18 -05:00