Commit Graph

451 Commits

Author SHA1 Message Date
Robin Ward b9abd7dc9e FEATURE: Shared Drafts
This feature can be enabled by choosing a destination for the
`shared drafts category` site setting.

* Staff members can create shared drafts, choosing a destination
category for the topic when it is published.

* Shared Drafts can be viewed in their category, or above the
topic list for the destination category where it will end up.

* When the shared draft is ready, it can be published to the
appropriate category by clicking a button on the topic view.

* When published, Drafts change their timestamps to the current
time, and any edits to the original post are removed.
2018-03-20 17:15:26 -04:00
Guo Xiang Tan 486bbe9cc2 FIX: Auto re-opened topics should restore category auto close settings.
https://meta.discourse.org/t/topic-closed-temporarily-due-to-community-flags-overwrites-category-auto-close-timer/77421
2018-02-27 15:33:31 +08:00
Arpit Jalan 33df2d6a02 FIX: data export should fill missing dates with zero value 2018-02-18 23:52:09 +05:30
Vinoth Kannan e700e3e882 FIX: post_destroyed webhook event not fired 2018-02-13 01:36:56 +05:30
Neil Lalonde 8fe61c68a1 FIX: process_post job should update baked_at and baked_version if it rebakes the post 2018-02-05 11:47:04 -05:00
Régis Hanol d233ecbe34 push updates to backups list to client 2018-01-31 12:05:06 +01:00
Sam 47058b29d3 FEATURE: emit external_id field with user webhook 2018-01-22 10:09:26 +11:00
Jan Suchal bc56d86a63 Support ruby 2.5.0 2018-01-09 16:03:17 +01:00
Gerhard Schlager 7b58afe677 FIX: ProcessPost job failed for posts that have no user 2017-12-21 14:45:59 +01:00
Sam 88a4ec5f1b FIX: stop forking regular backup jobs 2017-12-21 09:00:48 +11:00
Guo Xiang Tan 97ceebb570 SECURITY: Don't pass email backup token to sidekiq as a parameter.
* This exposes the token in the Sidekiq dashboard which can be
  viewed by an admin and defeats the purpose of using a token
  in the download backup email ink.
2017-12-18 11:25:22 +08:00
Sam b998efdc94 FIX: do not send mailing list emails to unapproved users 2017-12-13 15:13:17 +11:00
Arpit Jalan 3c56c9b637 FIX: strip webhook payload_url 2017-12-11 13:48:11 +05:30
Neil Lalonde b35960fc35 FIX: export admin reports to csv would have 0 rows in the csv file 2017-12-01 15:50:36 -05:00
Guo Xiang Tan c128e421c4 FIX: Don't run job if topic timer has already been deleted. 2017-11-30 15:26:26 +08:00
Régis Hanol 678e28794a FIX: properly handle too large & broken images in posts 2017-11-16 15:45:07 +01:00
Sam 9c22c68d39 FIX: only save custom fields if they actually change 2017-11-16 15:14:10 +11:00
Vinoth Kannan 7b494a65c9 NEW: large image placeholder added in cooked html (#5291) 2017-11-15 11:30:47 +01:00
Robin Ward 971e302ff2 FEATURE: Support an end date for user silencing 2017-11-14 13:20:19 -05:00
Robin Ward 1f14350220 Rename "Blocked" to "Silenced" 2017-11-10 14:10:27 -05:00
Régis Hanol c838f43a75 let's not generate an error when logging errors... 2017-10-18 23:14:13 +02:00
Neil Lalonde c53f41f4f2 FIX: don't flag watched words when rebaking posts 2017-10-12 15:34:22 -04:00
Arpit Jalan 97395ebb66 FIX: SSO avatar downloads were broken
cc @tgxworld
2017-10-12 12:12:04 +05:30
Régis Hanol f7282e4ecd use force_https site setting when adding scheme for downloading schemaless images locally 2017-10-12 00:06:24 +02:00
Régis Hanol 4e78abb537 let's try 3 times to download images locally 2017-10-11 23:11:44 +02:00
Sam 4ea87b5ab8 Merge branch 's3_refactor' 2017-10-09 10:27:52 +11:00
Sam 70bb2aa426 FEATURE: allow specifying s3 config via globals
This refactors handling of s3 so it can be specified via GlobalSetting

This means that in a multisite environment you can configure s3 uploads
without actual sites knowing credentials in s3

It is a critical setting for situations where assets are mirrored to s3.
2017-10-06 16:20:01 +11:00
Guo Xiang Tan 4ba5e678d8 Require dependencies to enable live reload in dev for Sidekiq. 2017-10-06 11:39:00 +08:00
Régis Hanol e212435545 FIX: redirect to top wasn't working 2017-10-04 22:08:41 +02:00
Guo Xiang Tan 0f2c5f5fc9 FIX: Don't raise error when trying to download avatar from URL. 2017-10-02 12:59:41 +08:00
Guo Xiang Tan 974836962d Fix invalid method call. 2017-10-02 12:50:22 +08:00
Guo Xiang Tan 77ea063751 FIX: Missing attribute. 2017-10-02 10:24:37 +08:00
Guo Xiang Tan 4eeb6014f4 Don't raise an error if user has been destroyed. 2017-09-30 09:09:40 +08:00
Sam 8ecf313a81 FIX: correctly raise errors when downloads fail
This corrects an issue where we are hitting Gravatar for 404 over and over

Also ensures file download properly reports errors
2017-09-28 16:35:43 +10:00
Régis Hanol 3a75242c38 add more logs to pull hotlinked images 2017-09-28 01:00:13 +02:00
Régis Hanol dd07094bd7 bump log level to debug download issues 2017-09-27 23:26:07 +02:00
Robin Ward 677b016387 Send a suspension message via email to a user 2017-09-25 12:26:41 -04:00
Guo Xiang Tan 23b787e0a6 Require dependency otherwise it causes Sidekiq to lock up in development. 2017-09-25 13:48:59 +08:00
Régis Hanol d9465bac13 add 'staged' column to user export 2017-09-13 18:09:11 +02:00
Vinoth Kannan 6e9671c2c3 UX: Placeholder images color changed & tootip added 2017-09-13 15:16:38 +05:30
Neil Lalonde 6831efe2e9 FIX: no notification was being sent when a post is hidden by community flags 2017-09-12 15:43:44 -04:00
Vinoth Kannan 0fb7831749 FEATURE: Add placeholders to broken and large image files (#5113) 2017-09-01 10:26:13 -04:00
Arpit Jalan e993d53260 FIX: handle missing parent category when exporting user archive
https://meta.discourse.org/t/download-my-posts-failed/67613?u=techapj
2017-08-09 14:37:21 +05:30
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Neil Lalonde 24cb950432 FEATURE: Watched Words: when posts contain words, do one of flag, require approval, censor, or block 2017-07-26 11:01:09 -04:00
Robin Ward 2f8f2aa1dd FEATURE: Whitelists for inline oneboxing 2017-07-21 15:41:47 -04: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
Leo McArdle d0b027d88d FEATURE: phase 1 of supporting multiple email addresses 2017-07-20 11:22:27 +09:00
Régis Hanol a6dff79c2c change log level to info when failing to download a hotlinked image 2017-07-12 11:06:28 +02:00
Guo Xiang Tan e92acb4c40 FIX: `Jobs::PullHotlinkedImages#is_valid_image_src` returns true for a generic string. 2017-07-06 18:31:15 +09:00
Guo Xiang Tan 061aa261da Log site name when logging to Logster in `Jobs::PullHotlinkedImages`. 2017-07-05 10:34:24 +09:00
Guo Xiang Tan 4e8b80c157 Remove unnecessary `ensure` block. 2017-07-05 10:21:42 +09:00
Robin Ward 0ba39109a0 FIX: Make `omit_default_port` the global default 2017-06-30 12:43:26 -04:00
Robin Ward 46a3b30021 FIX: omit the default port in the `Host` header 2017-06-30 12:36:02 -04:00
Sam 5c89a37ceb FIX: log when push notifications fail 2017-06-30 10:45:53 -04:00
Arpit Jalan 16d356ab4e FEATURE: resending invite should include original custom message
https://meta.discourse.org/t/will-resent-invite-include-original-custom-message/64699
2017-06-30 18:13:33 +05:30
Sam c1580b9d36 attempt to fix push notifications 2017-06-30 08:40:43 -04:00
Régis Hanol 2e7753c27f User 'FileHelper.is_image?' to check wether a link is poiting to an image 2017-06-22 12:54:42 +02:00
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