Commit Graph

343 Commits

Author SHA1 Message Date
Guo Xiang Tan
80e348d226 PERF: Speed up slow tests in our test suite.
Before

```
Finished in 7 minutes 23 seconds (files took 4.15 seconds to load)
7145 examples, 0 failures, 10 pending
```

After

```
Finished in 6 minutes 12 seconds (files took 4.41 seconds to load)
7145 examples, 0 failures, 10 pending
```
2017-06-22 11:23:31 +09:00
Guo Xiang Tan
d82dbd565b FIX: Remove dependency on rest-client. 2017-06-16 09:42:41 +09:00
Régis Hanol
d6c63cc5b2 FIX: user's default group should only be set once
Setting a user's default groups based on their email address should only be done once, ie. when they confirm their email address.
Previously we were doing this everytime we'd save a user record 🤷
2017-06-14 19:20:18 +02:00
Régis Hanol
5d63a7f4a6 FIX: pull hotlinked images even when they have no extension 2017-06-13 13:27:05 +02:00
Guo Xiang Tan
e888369f51 UX: Don't send emails for discobot notifications. 2017-06-12 17:00:27 +09:00
Vinoth Kannan
209383faab FEATURE: pull onebox images 2017-06-06 18:51:58 +05:30
Robin Ward
cdbe027c1c Refactor FileHelper to use keyword arguments. 2017-05-24 13:54:26 -04:00
Robin Ward
b23fc2bf84 Helper to find the final destination for a URL 2017-05-22 15:52:41 -04:00
Robin Ward
773445b8df FIX: Topic Crawling should only crawl HTTP/S urls 2017-05-22 11:57:20 -04:00
Guo Xiang Tan
4382a0bb07 Rename PostTimestampChanger -> TopicTimestampChanger. 2017-05-22 15:01:33 +08:00
Robin Ward
ea9f93dcc5 FIX: Don't crawl non-http/s links 2017-05-19 16:57:41 -04:00
Neil Lalonde
7821400141 FEATURE: staff can set a timer to remind them about a topic 2017-05-16 14:49:50 -04:00
Guo Xiang Tan
8eecd42856 FIX: Delete topic timer after completion. 2017-05-12 10:28:51 +08:00
Neil Lalonde
55b61e9bea rename topic_status_update to topic_timer 2017-05-11 18:27:53 -04:00
Neil Lalonde
1019bbda46 FEATURE: set a timer to delete a topic 2017-05-11 12:52:29 -04:00
Régis Hanol
4b7be137cb don't generate errors if 'upload_id' is invalid 2017-05-11 09:07:04 +02:00
Régis Hanol
9641d2413d REFACTOR: upload workflow creation into UploadCreator
- Automatically convert large-ish PNG/BMP to JPEG
- Updated fast_image to latest version
2017-05-11 00:16:57 +02:00
Robin Ward
c2bf525a06 Make CloseTopic a no-op just in case 2017-05-09 15:02:05 -04:00
Robin Ward
ba1868b051 FIX: There are still jobs enqueued for CloseTopic 2017-05-09 14:58:37 -04:00
Arpit Jalan
e6e0025326 FIX: handle BOM in bulk import CSV file 2017-05-09 22:38:07 +05:30
Arpit Jalan
94683b33b8 FIX: sanitize bulk invite error log 2017-05-09 17:41:59 +05:30
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
Arpit Jalan
86f1cc8c92 FIX: don't apply max_emails_per_day_per_user on critical emails 2017-05-03 17:07:39 +05:30
Arpit Jalan
cdce060a38 FIX: don't apply max emails per day per user to forgot password 2017-05-03 14:02:37 +05:30
Guo Xiang Tan
423f2ab228 FIX: Processing incoming email should be done in a background job. 2017-04-24 13:57:28 +08:00
Guo Xiang Tan
73180c8a19 FIX: Private message can be set to publish in the future. 2017-04-11 20:44:25 +08:00
Guo Xiang Tan
aadf4805a5 FIX: Topic status update not being deleted once it has been executed. 2017-04-11 10:32:13 +08:00
Guo Xiang Tan
690d2f4bd3 UX: Publish topic changes when topic is published. 2017-04-07 15:32:00 +08:00
Guo Xiang Tan
48a9860f07 FIX: Publish topic to a category should unlist it as well. 2017-04-07 13:58:52 +08:00
Robin Ward
17f2974d0a SECURITY: Confirm new administrator accounts via email 2017-04-04 15:59:01 -04:00
Guo Xiang Tan
69661be500 FIX: Don't raise an error if TopicStatusUpdate has been deleted. 2017-04-04 14:29:47 +08:00
Guo Xiang Tan
f4758a4c4d FEATURE: Allow admins to schedule a topic to be published in the future. 2017-04-04 11:16:05 +08: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
Arpit Jalan
df246c79b6 FEATURE: add user profile fields in user list export 2017-03-21 15:51:52 +05:30
Robin Ward
1957d12670 SECURITY: Don't use backticks for exporting your archive 2017-03-16 16:24:59 -04:00
Guo Xiang Tan
0a87547cbc Fix broken tests. 2017-03-16 10:22:15 +08:00
Erick Guan
cfbfea0596 FEATURE: Allow easier customization to the web hook event serialization. 2017-03-16 10:09:05 +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
Régis Hanol
cf8bc4483f FIX: always send critical emails even when bounce score threshold has been reached 2017-03-08 10:06:16 +01:00
Arpit Jalan
d5bcc70e9c FIX: grant trust level when bulk adding users to group 2017-03-06 14:39:53 +05:30
Blake Erickson
80858bae2c FEATURE: further restrict downloading of backups
- send email to logged in admin when they press the "download" button
- show pop-up that email was sent
- create email template
- require a valid token to download backup
2017-03-01 08:28:34 -07:00
Arpit Jalan
19f7beaa2c FIX: topic links were getting dropped when post is rebaked 2017-01-30 14:55:53 +05:30
Robin Ward
496682c442 Merge pull request #4662 from tgxworld/fix_localized_group_name_change
Fix localized group name change
2017-01-26 10:50:00 -05:00
Guo Xiang Tan
706b4f6b9f FEATURE: Remap group mentions when group name has been changed. 2017-01-18 13:39:34 +08:00
Leo McArdle
b60e9b7330 FIX: Handle img src starting with "//" in pull_hotlinked_images job 2017-01-16 10:50:07 +00:00
Arpit Jalan
7a1ff59822 FIX: PM email to suspended member was broken 2017-01-05 13:58:14 +05:30
Guo Xiang Tan
076a08d8e1 FIX: Unactivated users should not be automatically added into groups as well. 2016-12-21 18:15:01 +08:00
Guo Xiang Tan
7228081820 FIX: Automatic group membership should not add staged or unactivated users. 2016-12-21 18:04:26 +08:00
Sam
f867af6bf9 bye bye byebug 2016-12-15 15:52:25 +11:00
Guo Xiang Tan
3666575b46 UX: Improve styling for groups page. 2016-12-15 12:19:13 +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
Guo Xiang Tan
05f55dbc10 FEATURE: Group logs. 2016-12-12 17:29:54 +08:00
Arpit Jalan
ce974da9e5 FIX: simplify CSV file upload 2016-12-05 14:09:08 +05:30
Sam
ac2c035856 FIX: stop raising exceptions when a post goes missing 2016-11-08 14:51:56 +11:00
Erick Guan
dd58c00699
FEATURE: Add instance id in the webhook payload 2016-11-04 15:21:41 +01:00
Arpit Jalan
478418e780 FIX: notify_old_email template did not had new_email 2016-10-25 23:50:55 +05:30
Régis Hanol
923db2e559 FIX: download avatar from facebook/twitter in a job in order to prevent hangs when avatars are huge 2016-10-24 17:15:13 +02: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
Arpit Jalan
e5a13b0ac1 FIX: specify CSV file encoding and better error reporting 2016-10-18 00:31:35 +05:30
Erick Guan
707fcb9434
FIX: Content-Lenght should be the size in octets 2016-09-21 10:31:20 +08:00
Erick Guan
00d5facf36 FEATURE: prompts new webhook events 2016-09-19 12:07:17 +08:00
Erick Guan
7423140825
FIX: show event name in webhook headers 2016-09-12 17:48:54 +08:00
Erick Guan
9ce61b4586 FEATURE: Webhooks. 2016-09-05 18:44:00 +08:00
Sam
340874d345 FIX: post notifications in JSON so we properly support arrays and so on 2016-09-04 15:51:16 +10:00
Arpit Jalan
929730c008 FIX: properly insert images in markdown inline format (take 2) 2016-09-01 17:56:39 +05:30
Arpit Jalan
54a1180140 FIX: properly insert images in markdown inline format 2016-09-01 11:55:40 +05:30
Sam
896732975e correct url linked in push notification 2016-08-26 13:45:56 +10:00
Sam
4fe52c8cbe FEATURE: backend support for pushing notifications to clients 2016-08-26 12:47:10 +10:00
Régis Hanol
51322a46b3 FEATURE: retry processing incoming emails on rate limit 2016-08-08 22:28:27 +02:00
James Kiesel
c2819e99f4 Don't halt notification emails for those on daily mailing list mode 2016-08-03 12:29:38 -04:00
Arpit Jalan
f1566ef80b FIX: escape comma in exported CSV file 2016-07-19 13:19:46 +05:30
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
Sam
813fcebdd1 FIX: email_always was not respected correctly
In the past email always meant, email me even if active UNLESS I read post

Now emails always means, always, even if I read the post
2016-07-01 11:22:07 +10:00
Régis Hanol
76766a25bf FIX: wrong translation key 2016-06-28 17:22:34 +02:00
Arpit Jalan
7b205ebba4 FEATURE: customize invite email message 2016-06-06 20:15:30 +05:30
Régis Hanol
99ad251731 different email footer when mailing_list_mode is enabled 2016-06-03 15:48:54 +02:00
Régis Hanol
86d50d0017 PERF: stream CSV exports so they don't fail when they are too big 2016-05-25 22:20:35 +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
Guo Xiang Tan
b68860ee28 FIX: Do not send email when user of the post has been deleted. (#4228) 2016-05-17 17:42:15 +02:00
Régis Hanol
d224966a0e FIX: retry sending an email in 1 hour when SMTP server is busy 2016-05-09 20:37:33 +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
Arpit Jalan
e7d1fa8120 Merge pull request #4186 from shaktikatare1989/suspention-details-in-log
Fix: Suspensions and Blocks do not give enough details in logs
2016-04-21 09:00:36 +05:30
shakti katare
cd4c34204d Fix: Suspensions and Blocks do not give enough details in logs 2016-04-20 10:45:19 +05:30
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
a130cb8305 FEATURE: move more urgent emails notifications to critical queue
Move signup, admin login and password change email notifications
to critical queue
2016-04-07 14:39: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
Régis Hanol
79639e2dec FIX: ensure group's users counters are kept in sync 2016-04-04 17:03:18 +02: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
Robin Ward
5771d2aee2 SECURITY: Support for confirm old as well as new email accounts 2016-03-08 14:52:22 -05:00
Arpit Jalan
05288144b5 FIX: export user list based on trust level filter 2016-03-07 18:49:31 +05:30
Guo Xiang Tan
f89e9024ba FIX: Topic and Post may be nil. 2016-02-24 16:27:28 +08:00
Sam
f0e942f647 PERF: move 3 more option columns out of the user table 2016-02-18 16:57:22 +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
bf96025507 link email logs to the post that generate the email notification when available 2016-02-16 16:35:57 +01:00