Commit graph

1853 commits

Author SHA1 Message Date
riking
3396e6fea3 Centralize MessageBus post updates
After this change, only two files directly publish to MessageBus with a
topic interpolated in the channel: Post and TopicUser.
2014-08-28 20:40:36 -07:00
Sam
fe6e4d7da1 FIX: fails on initial migration if default_locale is nil 2014-08-29 12:01:28 +10:00
Sam
1bef22bbb9 Merge pull request #2703 from riking/email-pr-receiver
Heavy refactor for Email::Receiver
2014-08-29 09:59:59 +10:00
Sam
8ab9c57ca5 Merge pull request #2707 from eyalev/rtl-email
Enable RTL direction in emails.
2014-08-29 09:54:57 +10:00
riking
8ddd90daa4 Have parse_body() recover from ASCII-8BIT encoding
Added a test to make sure that the result can be passed into TextCleaner
(which expects UTF-8)
2014-08-28 14:38:19 -07:00
riking
0a09593f3b FIX: Prefer HTML in incoming emails, heavily refactor email receiver
This commit heavily refactors Email::Receiver to both better handle
different emails and improve testability.

A primary focus of the refactor is reducing the usage of class
variables, in favor of actually passing parameters - making it possible
for multiple tests to use the same Receiver instance.

The EmailLog reported when a topic is created is reflected to put the
user's email in the to_address field, instead of the system address.

The discourse_email_parser function is renamed to
discourse_email_trimmer, and additional stopping conditions are added to
make up for EmailReplyParser's inability to deal with html at the start
of a line.

The force_encoding calls are refactored out to a 'fix_charset' method.

parse_body is renamed to select_body, and the scrub_html method is
dropped in favor of the new HtmlCleaner class.

A new parse_body method is added, which performs the job of the removed
lines of code in the 'process' method.

EmailUnparsableError is redefined again, to be encoding errors (when the
declared encoding is not what was delivered).
2014-08-28 14:36:10 -07:00
riking
cb55ef4702 Add Email::HtmlCleaner for email processing
This class is in charge of stripping out most of the crap from the HTML
portion of emails that email clients generate, so that it can be sanely
post-processed for signatures and quoting boundaries.
2014-08-28 14:36:10 -07:00
riking
0d0225133c FIX: Failed incoming emails could create empty topics
A failure condition is eliminated where a topic would be created, but post
creation would fail, leaving the forum with a topic without any posts.
By asking PostCreator to create the topic instead, inside of its
transaction, this failure condition is eliminated.

Additionally, attachments are restored to working status. Previously,
the attachment code would build up the post raw, but then drop it and
not do anything with the result (creating orphaned uploads). By actually
placing the raw value back in the options hash, it is included in the
created post.
2014-08-28 14:35:43 -07:00
Robin Ward
9e2c72e277 Allow restoring from backups in development mode even if the setting is
off.
2014-08-28 17:02:48 -04:00
Robin Ward
8a6c4234fc FIX: Re-enable searching for topic by id when using the split topic
interface.
2014-08-28 15:42:29 -04:00
Sam
a1244043d3 FIX: when search finds a deep link in a topic it takes you to it 2014-08-28 17:16:39 +10:00
Robin Ward
f10d6ed88a FIX: RSS feeds should use created_at not bumped_at 2014-08-27 12:42:54 -04:00
Eyal Levin
e0c2f3df3a Enable RTL direction in emails. 2014-08-27 14:38:03 +03:00
Sam
bba8d1978f don't load tasks for now, its not allowing me to disable 2014-08-27 15:28:38 +10:00
Sam
9fe28f20d0 attempt to skip on migrate 2014-08-27 15:26:53 +10:00
Neil Lalonde
5db66aeafa Version bump to v1.0.0 2014-08-26 15:24:07 -04:00
Neil Lalonde
79e37ad1a8 FIX: thor populate:posts tool needs to use find_by_username 2014-08-26 12:32:17 -04:00
Sam
3ea76815e4 Merge pull request #2686 from meglio/ru-plurals
Update RU pluralization to use 3 keys: one, few, other (as by Transifex)
2014-08-26 12:42:59 +10:00
riking
41dadcc349 Fix local onebox subcategory urls 2014-08-25 16:47:54 -07:00
Régis Hanol
7aaf718cf3 update bbcode dialect and fix vBulletin importer 2014-08-25 10:48:29 +02:00
Anton Andriyevskyy
c42a5551a1 Update RU pluralization to use 3 keys: one, few, other (as by Transifex) 2014-08-23 15:28:14 +03:00
Régis Hanol
77ba2015eb FEATURE: new disable_emails site setting 2014-08-23 11:07:37 +02:00
Robin Ward
f67f34d889 FIX: Load order of Javascript files 2014-08-22 19:27:20 -04:00
Robin Ward
e8cade40c7 Improve search results by introducing an aggregate post search data
filter. It seems performant despite the extra content being searched.
2014-08-22 16:56:26 -04:00
Robin Ward
b1eb44bd0b Merge pull request #2678 from techAPJ/patch-2
FIX: lazyYT youtube links not getting included in email
2014-08-22 14:54:41 -04:00
Arpit Jalan
f92b69ed2f FIX: lazyYT youtube links not getting included in email 2014-08-23 00:21:31 +05:30
Neil Lalonde
05d2083796 FIX: can delete category if topic_count < 0 2014-08-22 12:25:28 -04:00
Sam
ac4f6d9c97 Merge pull request #2647 from riking/multiple-addresses
Allow processing of email sent to multiple addresses
2014-08-22 10:32:42 +10:00
Sam
31cc6ea633 Merge pull request #2633 from zohararad/master
Add RTL support to Discourse CSS Theme
2014-08-22 10:23:21 +10:00
Sam
c865bf0d71 Merge pull request #2670 from Wilhansen/sso_override_avatar
Implement SSO overriding avatars.
2014-08-22 10:22:06 +10:00
Neil Lalonde
dddeb1a8aa Version bump to v0.9.9.18 2014-08-21 17:14:16 -04:00
Robin Ward
33de48dc0c FIX: Float site settings were marked as overridden, reset didn't work. 2014-08-20 15:24:56 -04:00
Robin Ward
55c01d3320 Upgrade moment.js to latest version, add missing locales now that we
support more languages.
2014-08-20 14:41:50 -04:00
Régis Hanol
3fe6fc54d9 FEATURE: add an alert in sidekiq's scheduler tab when sidekiq is paused 2014-08-20 20:01:57 +02:00
Régis Hanol
8a20d05ba5 FEATURE: backup without uploads 2014-08-20 18:53:58 +02:00
Régis Hanol
7a621d97b9 FIX: do not rollback imports unless data has been changed 2014-08-20 18:53:38 +02:00
Akshay
3fd784b513 removed useless assignments at some places 2014-08-19 18:10:23 +05:30
Sam
b160882ef2 Improve identity for scheduler 2014-08-19 20:56:46 +10:00
Sam
6d9a88c33b FIX: hanging specs 2014-08-19 20:56:25 +10:00
Wilhansen Li
e0f970326f Implement SSO overriding avatars.
Implemented by having Discourse download the image from the provided URL
and treating it as a custom upload.

Adds two more parameters to the SSO site’s response:

* `avatar_url` specifies the URL of the overriding avatar.
* `avatar_force_update` Discourse does not re-download avatars that
has already been download from the same URL. Setting this to true forces
Discourse to re-download the avatar in `avatar_url`

Note that both parameters are ignored if `sso_overrides_avatar` is set
to false.
2014-08-19 15:53:34 +08:00
Sam
070cdbe64b FIX: race condition 2014-08-19 16:25:57 +10:00
Sam
35ea1274e2 FIX: simplify, use our redis instead 2014-08-19 15:50:17 +10:00
Sam
997ab7a770 FIX: signaling seems flaky, simply kill thread 2014-08-19 14:59:40 +10:00
Sam
cb686792df FIX: add safety so sidekiq can no longer be paused indefinitely
If the process pausing sidekiq dies sidekiq will come out of pause mode
2014-08-19 14:04:58 +10:00
Robin Ward
e690242858 FIX: If a consistency job hasn't run and a bunch of posts are moved,
don't show as unread in the topic list.
2014-08-18 16:59:28 -04:00
Robin Ward
ecf3a2a510 REVERT: Previous fix was broken, needs more work 2014-08-18 16:46:33 -04:00
Robin Ward
f1486c7728 FIX: Inconsistency between unread counter and unread filter 2014-08-18 16:15:26 -04:00
Robin Ward
629bfb73f5 FIX: Sort order on activity column is incorrect 2014-08-18 13:26:27 -04:00
Régis Hanol
9f72971d26 FEATURE: add the pencil glyph when the post was edited after the first flag 2014-08-18 18:56:39 +02:00
Neil Lalonde
1445ad61da FIX: case-insensitive category lookup when creating topics 2014-08-18 11:07:49 -04:00
Régis Hanol
e1191a5fcf Merge pull request #2511 from windhamg/s3_iam_role
support for EC2 IAM roles with Amazon S3 file store/backup
2014-08-18 16:14:14 +02:00
Akshay
b4e38e5646 updated checks of environment with Rails.env by Rails.env methods 2014-08-18 15:36:47 +05:30
Sam
8737ffb272 Merge pull request #2658 from akshaymohite/optimization-fixes
Not initializing variable for looping if unused in loop
2014-08-18 14:42:52 +10:00
Sam
e0a82d3088 FIX: rate limit password reset email 2014-08-18 10:55:30 +10:00
Neil Lalonde
bf5563e2fc Version bump to v0.9.9.17 2014-08-15 17:27:45 -04:00
Neil Lalonde
2f32af3941 FIX: staff should be able to edit topics that have been archived 2014-08-15 12:45:05 -04:00
Robin Ward
26ca197be9 Adds Site settings to configure post:like ratio thresholds 2014-08-15 12:02:29 -04:00
Sam
0e5ab97a87 BUG: staff should not be allowed to edit emails when email_editable is false 2014-08-15 12:41:01 +10:00
Akshay
6301a43d57 Not initializing variable for looping if unused in loop 2014-08-15 03:24:55 +05:30
Neil Lalonde
acfe81e61f FIX: add referer to version_check request 2014-08-14 17:30:05 -04:00
Robin Ward
6e67fab9aa Merge pull request #2656 from akshaymohite/optimization-fixes
Avoid using to_s when performing String Interpolation
2014-08-14 17:17:57 -04:00
Neil Lalonde
658cdd2c9e FIX: PostDestroyer needs to update user stats. Delete All Posts button was broken, making it impossible to delete users. 2014-08-14 15:21:16 -04:00
Akshay
7ef61144e7 Avoid using to_s when performing String Interpolation 2014-08-14 23:55:27 +05:30
Neil Lalonde
5caf72510c Prevent deleting the static page doc topics 2014-08-13 17:03:45 -04:00
riking
cce8b4720a Have reciever handle multiple To addresses 2014-08-13 11:43:49 -07:00
Robin Ward
0adfeb1cff ES6: Mega update of controllers 2014-08-13 10:22:47 -04:00
Robin Ward
c74550fbad Merge pull request #2644 from xfix/y3k
Year 3000 problem while displaying thread pins.
2014-08-12 12:20:10 -04:00
Konrad Borowski
2c3bdf48d1
Use infinity instead of 3000-01-01 as max date.
This fixes the y3k problem in Discourse that made topics with pins
appear after threads updated in year 3000.
2014-08-12 09:23:57 +02:00
Régis Hanol
f4208ae83f FEATURE: normalize whitespaces in topic title/post content 2014-08-12 00:01:58 +02:00
Jeff Atwood
f15d106eb9 remove all version stats 2014-08-11 12:42:03 -07:00
Robin Ward
15c7e01b90 FEATURE: Can bulk delete topics now using the modal. 2014-08-11 15:14:02 -04:00
Robin Ward
21185617b0 Show the reason the topic couldn't be split rather than a generic error. 2014-08-11 14:43:19 -04:00
Régis Hanol
d0095ce041 FEATURE: migrate vanilla importer to new import architecture 2014-08-11 18:44:17 +02:00
Régis Hanol
85570ddc77 TRIVIAL: fix grammar on 'deferred' columns 2014-08-11 11:56:54 +02:00
Régis Hanol
e64d3b8a42 FIX: disagree flag should unhide hidden post 2014-08-11 10:48:00 +02:00
Sam
f897c89d48 FIX: run reaper after fork 2014-08-11 17:51:55 +10:00
Sam
9fc7c145b3 FEATURE: added method for draining idle connections 2014-08-11 15:13:37 +10:00
Neil Lalonde
1022806f6a Version bump to v0.9.9.16 2014-08-08 17:20:33 -04:00
Neil Lalonde
50ac4c6336 FIX: cleanup aliases in email From and Reply-to fields to prevent Bad sender address syntax errors 2014-08-08 13:35:47 -04:00
Zohar Arad
c99ab7fb06 ensure RTLit gem is included and CSS is RTLed if css_rtl is enabled in discourse config 2014-08-08 16:06:29 +03:00
Zohar Arad
557af8b8bd Add RTL support to Discourse CSS pre-processing using the RTLit gem and configurable via discourse.conf 2014-08-08 09:31:31 +03:00
Sam
49f738fe27 FEATURE: allow users to dismiss unread posts 2014-08-08 16:29:51 +10:00
Sam
c1cbf1b269 PERF: new table used for title similarity search 2014-08-08 15:50:26 +10:00
Sam
16b7004767 PERF: optimise and improve topic similarity search
FIX: shows up similarity search with blank results
2014-08-08 12:12:53 +10:00
Régis Hanol
7c65adfd6f FEATURE: raise an exception when the email is missing in the OpenId callback 2014-08-07 19:28:50 +02:00
Régis Hanol
1db40fce22 TRIVIAL: remove debugging leftovers 2014-08-07 19:21:38 +02:00
Régis Hanol
3ae1ebdfc3 FIX: use PostDestroyer when deleting/recovering a topic 2014-08-07 19:12:35 +02:00
Neil Lalonde
7926b4f5c1 FIX: moment.js data formats were always english 2014-08-07 12:08:23 -04:00
Sam
ae2d80501a PERF: run full vacuum every 90 days (during migration)
Will reclaim space and improve perf
2014-08-07 11:07:30 +10:00
Robin Ward
c709ea8f9e FIX: Don't generate compatibility layer for test files 2014-08-06 18:07:27 -04:00
Robin Ward
6783565d8f Revert "Enable RTL direction in emails." 2014-08-06 15:30:07 -04:00
Eyal Levin
f8c99a35d0 Enable RTL direction in emails. 2014-08-06 15:27:15 +03:00
Sam
6eaaf6714c FIX: logic for can_see_topic? 2014-08-05 14:37:53 +10:00
Sam
4536f772c1 FIX: more reliable topic list counts
- unread was not incrementing when you read last post on topic
- new notifications were being inserted even if they existed in list
- terminology was all mixed up "1 new posts", split to 3 messages
- latest behaves as expected, updating count of new and updated topics
2014-08-05 13:27:34 +10:00
Régis Hanol
458c0c67a3 FIX: post_actions from deleted users should not show up in the old flags section 2014-08-04 22:51:33 +02:00
Régis Hanol
925a15c9aa FIX: proper exit status code for backup/restore scripts 2014-08-04 17:55:09 +02:00
Régis Hanol
2e134742d4 FIX: only show 'defer flags' when there are active flags on the post 2014-08-04 17:29:01 +02:00
Robin Ward
436ea982ae TYPO: Missing comma 2014-08-01 17:29:20 -04:00
Robin Ward
3c66e48573 TESTS: Remove URL_FIXTURES constant for pretender 2014-08-01 17:27:01 -04:00
Neil Lalonde
443caaa8f7 FIX: don't let admins skip post validations, unless it's faq, tos, or privacy 2014-08-01 14:53:35 -04:00