discourse/lib
Martin Brennan 64ba5b1d21
FIX: Group SMTP email improvements (#11633)
Fixes a rare race condition causing the `Imap::Sync` class to create an incoming email and associated post/topic, which then kicks off the PostAlerter to notify others in the PM about a reply in the topic, but for the OP which is not necessary (because the person emailing the IMAP inbox already knows about the OP). Basically, we should never be sending the group SMTP email for the first post in a topic.

Also in this PR:

* Custom attribute accessors for the to/from/cc addresses on `IncomingEmail`, to parse them from an array to a joined string so the logic for this is only in one place.
* Store extra detail against the `IncomingEmail` created in `GroupSmtpMailer`
* regex test Mail header Reply-To as string instead of Field, which fixes `warning: deprecated Object#=~ is called on Mail::Field; it always returns nil`
* Add DEBUG_IMAP to log all IMAP logs as warnings for easier debugging
* Changed the Rails logging to `ImapSyncLog` in the `GroupSmtpMailer`
2021-01-05 15:32:04 +10:00
..
auth FIX: Avoid clock skew issues when logging in with Google (#11442) 2020-12-09 09:09:31 +00:00
autospec DEV: watch more test directories (#11346) 2020-11-25 11:12:23 +00:00
backup_restore PERF: Disable Sidekiq only during database restore (#10857) 2020-10-16 15:19:02 +02:00
common_passwords DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
compression FIX: Decompressing lots of small files triggered error 2020-01-09 15:11:31 +01:00
content_security_policy FEATURE: Add Google Universal Analytics v4 as an option (#11123) 2020-11-06 14:15:36 -06:00
demon FEATURE: Allow plugins to register demon processes (#11493) 2020-12-16 09:43:39 +00:00
email FIX: Group SMTP email improvements (#11633) 2021-01-05 15:32:04 +10:00
emoji FIX: issues with frowning/grinning (#11235) 2020-11-25 09:09:35 +01:00
file_store PERF: Improve cook_url performance for topic thumbnails (#11609) 2020-12-30 18:13:13 +00:00
freedom_patches Revert "FIX: bump nokogumbo to 2.0.3 with patch (#11357)" (#11366) 2020-11-27 17:14:12 +11:00
generators REFACTOR: Move javascript tests inside discourse app 2020-10-02 11:29:36 -04:00
guardian PERF: optimize homepage and topic performance (#11607) 2020-12-30 13:08:02 +00:00
highlight_js
i18n DEV: Add plugins client/server translation yml file priority structure (#11194) 2020-11-11 09:44:01 -06:00
imap DEV: IMAP log to database (#10435) 2020-08-14 12:01:31 +10:00
import
import_export FEATURE: Include category position when exporting categories (#9658) 2020-05-07 12:17:15 +10:00
javascripts REFACTOR: Support bundling our `admin` section as an ember addon 2020-09-22 15:14:29 -04:00
middleware FIX: Bypass `AnonymousCache` for `/srv/status` route. (#11491) 2020-12-16 16:47:46 +11:00
migration FIX: Allow post migrations using `#change` to carry out unsafe migration 2020-05-15 14:23:27 +08:00
onebox UI: Category Onebox styling changes (#11448) 2020-12-09 11:36:05 -06:00
plugin FEATURE: Allow plugins to register demon processes (#11493) 2020-12-16 09:43:39 +00:00
pretty_text FIX: Missing files from previous commit 2020-09-15 10:59:41 -04:00
rate_limiter
reviewable FEATURE: Nokogumbo (#9577) 2020-05-05 13:46:57 +10:00
scheduler
search FIX: Limit PG headline based search blurb generation to 200 characters. 2020-08-12 15:34:27 +08:00
seed_data DEV: skip_jobs when seeding topics (#11289) 2020-11-19 17:31:21 +01:00
sidekiq DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
site_settings FIX: Do not enable published page if secure media enabled (#11131) 2020-11-06 10:33:19 +10:00
stylesheet DEV: Use indexes when importing SCSS from a folder (#11591) 2020-12-30 15:29:10 -05:00
svg_sprite UX: Move do not disturb to profile panel (#11592) 2020-12-31 08:39:06 -06:00
tasks DEV: Remove jquery.ba-resize (#11457) 2020-12-11 11:36:32 -05:00
theme_store FIX: Gracefully handle force pushes for remote themes (#11325) 2020-11-23 15:29:22 +02:00
turbo_tests DEV: Add seed explicitly in turbo_rspec so that runs can be reproduced 2020-08-07 16:51:53 +01:00
validators FEATURE: Improve errors when title is invalid (#11149) 2020-11-11 15:11:36 +02:00
webauthn SECURITY: 2FA with U2F / TOTP 2020-01-15 11:27:12 +01:00
wizard UX: Minor cosmetic fixes to the wizard (#11172) 2020-11-09 15:14:57 -05:00
admin_confirmation.rb DEV: Upgrade Redis to 4.2.1. 2020-06-15 10:05:22 +08:00
admin_constraint.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
admin_user_index_query.rb DEV: Standardize table sorting verbiage (#9757) 2020-05-14 20:10:59 -06:00
age_words.rb
archetype.rb
auth.rb DEV: remove instagram login site settings and auth classes. (#11073) 2020-10-30 09:09:56 +05:30
backup_restore.rb FIX: Killing a Unicorn worker shouldn't kill a running backup or restore process 2020-10-13 19:48:53 +02:00
badge_posts_view_manager.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00
badge_queries.rb FEATURE: multiple use invite links (#9813) 2020-06-09 20:49:32 +05:30
base62.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00
bookmark_manager.rb FIX: Make deleted topic post bookmarks more resilient (#10619) 2020-09-07 14:52:14 +10:00
bookmark_query.rb FIX: Bookmark search fixes (#10239) 2020-07-17 15:55:07 +10:00
bookmark_reminder_notification_handler.rb FIX: dont error when bookmark topic is nil (#10555) 2020-08-31 09:15:36 +10:00
browser_detection.rb FIX: Detect DiscourseHub user agent. 2019-08-09 11:58:15 +03:00
cache.rb FIX: ensures defined expired_in is passed from write to write_entry (#11622) 2021-01-04 10:34:44 +01:00
canonical_url.rb FEATURE: default canonical URL (#9738) 2020-05-12 09:13:20 +10:00
category_badge.rb
comment_migration.rb
composer_messages_finder.rb DEV: pluck_first 2019-10-21 12:08:20 +01:00
configurable_urls.rb Replace `base_uri` with `base_path` (#10879) 2020-10-09 12:51:24 +01:00
content_buffer.rb
content_security_policy.rb FIX: Allow CSP to work correctly for non-default hostnames/schemes (#9180) 2020-03-19 19:54:42 +00:00
cooked_post_processor.rb FIX: Do not optimize animated images in cooked posts (#11214) 2020-11-12 21:47:30 +02:00
crawler_detection.rb FIX: use allowlist and blocklist terminology (#10209) 2020-07-27 10:23:54 +10:00
csrf_token_verifier.rb DEV: Provide method for auth plugins to generate a CSRF token 2019-08-13 01:13:08 +01:00
current_user.rb
custom_renderer.rb
custom_setting_providers.rb
db_helper.rb DEV: Skip readonly tables when remapping content (#10461) 2020-08-18 08:53:12 +01:00
directory_helper.rb
discourse.rb UX: Add group name to error message (#11333) 2020-11-24 13:06:52 +02:00
discourse_cookie_store.rb
discourse_diff.rb FEATURE: Nokogumbo (#9577) 2020-05-05 13:46:57 +10:00
discourse_event.rb DEV: Ensure DiscourseEvent handlers cleaned up during specs (#11205) 2020-11-11 19:46:13 +00:00
discourse_hub.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
discourse_ip_info.rb FIX: MaxMind DB file not downloading correctly 2020-01-05 22:08:13 +11:00
discourse_js_processor.rb FEATURE: Add Google Universal Analytics v4 as an option (#11123) 2020-11-06 14:15:36 -06:00
discourse_logstash_logger.rb FIX: Use 'hostname' when Discourse.os_hostname is not available 2020-02-18 13:37:39 +02:00
discourse_plugin_registry.rb DEV: Deprecate SCSS variable overrides in plugins (#11589) 2020-12-28 15:28:11 -05:00
discourse_redis.rb DEV: Use rails_failover gem for ActiveRecord and Redis failover handling 2020-06-15 15:47:07 +08:00
discourse_tagging.rb FIX: Disallow zero-width and other non-printing characters in tags (#11546) 2020-12-22 09:27:37 -06:00
discourse_updates.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
disk_space.rb FIX: correct upload statistics report for external storage 2020-02-20 15:15:53 +11:00
distributed_cache.rb
distributed_memoizer.rb DEV: Replace `Time.new` with `Time.now` (#9142) 2020-03-09 17:37:49 +01:00
distributed_mutex.rb FIX: Off-by-one error setting the distributed mutex key to expire 2020-02-03 14:54:50 +00:00
edit_rate_limiter.rb
email.rb FEATURE: IMAP delete email sync for group inboxes (#10392) 2020-08-12 10:16:26 +10:00
email_backup_token.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
email_cook.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
email_updater.rb FIX: When admin changes an email for the user the user must confirm the change (#10830) 2020-10-07 13:02:24 +10:00
encodings.rb
enum.rb
enum_site_setting.rb
excerpt_parser.rb FIX: do not raise error if 'class' attribute is not found. 2020-05-01 10:03:40 +05:30
feed_element_installer.rb
feed_item_accessor.rb
file_helper.rb PERF: optimize homepage and topic performance (#11607) 2020-12-30 13:08:02 +00:00
filter_best_posts.rb
final_destination.rb Onebox improved error handling and support for Instagram Access Tokens (#11253) 2020-11-18 12:55:16 -05:00
flag_query.rb FIX: use allowlist and blocklist terminology (#10209) 2020-07-27 10:23:54 +10:00
flag_settings.rb
gaps.rb
global_path.rb
guardian.rb FEATURE: Add site setting to restrict ignore feature to trust level (#11297) 2020-11-20 10:05:20 -08:00
has_errors.rb
hijack.rb DEV: Add more debugging context to onebox generation 2020-10-22 12:50:22 +08:00
homepage_constraint.rb
html_prettify.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00
html_to_markdown.rb Revert "DEV: Add logging for stack level too deep exception in HtmlToMarkdown" 2020-07-09 13:41:33 +01:00
http_language_parser.rb FIX: Include resolved locale in anonymous cache key (#10289) 2020-07-22 18:00:07 +01:00
image_sizer.rb
import_export.rb FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
inline_oneboxer.rb FEATURE: Enable inline onebox for all domains by default (#11523) 2020-12-18 10:27:32 +11:00
introduction_updater.rb FIX: replace default welcome topic post with new value from wizard 2020-04-01 15:42:45 -04:00
ip_addr.rb
js_locale_helper.rb DEV: Add plugins client/server translation yml file priority structure (#11194) 2020-11-11 09:44:01 -06:00
json_error.rb
letter_avatar.rb
markdown_linker.rb
mem_info.rb
message_bus_diags.rb PERF: avoid shelling to get hostname aggressively 2020-02-18 15:13:19 +11:00
method_profiler.rb
mini_sql_multisite_connection.rb DEV: Update `DB.after_commit` to be compatible with 'real' transactions (#11294) 2020-12-08 11:03:31 +11:00
mobile_detection.rb
new_post_manager.rb FEATURE: Review posts with media. (#10693) 2020-09-18 12:45:09 -03:00
new_post_result.rb Support for custom messages and redirects when creating posts (#8434) 2019-11-29 09:30:54 -05:00
notification_levels.rb
oneboxer.rb FIX: Make Oneboxer#apply insert block Oneboxes correctly (#11449) 2020-12-14 17:49:37 +02:00
onpdiff.rb FIX: Show a correct diff when editing consecutive paragraphs (#8177) 2019-10-11 03:50:37 -04:00
pbkdf2.rb DEV: Switch our fast_xor gem for xorcist (#10565) 2020-08-31 13:20:44 -06:00
permalink_constraint.rb
pinned_check.rb
plain_text_to_markdown.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00
plugin_gem.rb FEATURE: allow specifying platform name for platform specific gems (#10559) 2020-08-31 12:36:04 +10:00
plugin_initialization_guard.rb DEV: Print backtrace of error when plugin fails to initialize. 2020-06-09 10:25:43 +08:00
post_action_creator.rb FIX: Reviews that are auto-hidden by a trusted spam flagger should always have enough weight. (#10284) 2020-07-22 11:42:15 -03:00
post_action_destroyer.rb FIX: Unlike own posts on ownership transfer (#10446) 2020-08-19 09:21:02 -06:00
post_action_result.rb
post_creator.rb FEATURE: silently close topic (#11392) 2020-12-03 10:43:19 +11:00
post_destroyer.rb FIX: remove post-action when a post is permanently deleted (#11242) 2020-11-17 07:40:36 +11:00
post_jobs_enqueuer.rb FIX: correct tracking when mute all categories (#11441) 2020-12-10 16:49:05 +11:00
post_locker.rb
post_merger.rb
post_revisor.rb FIX: correct tracking when mute all categories (#11441) 2020-12-10 16:49:05 +11:00
pretty_text.rb FIX: Replace Vimeo iframes with a link in emails (#11443) 2020-12-09 14:58:36 +02:00
promotion.rb FIX: TL2 promotion message and advance training (#10679) 2020-09-22 10:17:52 +10:00
quote_comparer.rb FEATURE: Nokogumbo (#9577) 2020-05-05 13:46:57 +10:00
rake_helpers.rb Try fix upload_spec flakys and remove logging from tasks/uploads_spec 2020-02-18 15:08:58 +10:00
rate_limiter.rb PERF: introduce aggressive rate limiting for anonymous (#11129) 2020-11-05 16:36:17 +11:00
read_only_header.rb
retrieve_title.rb FIX: Inline Onebox should use encoding from Content-Type header when present (#11625) 2021-01-04 22:32:08 +03:00
route_format.rb
route_matcher.rb REFACTOR: Introduce RouteMatcher class 2020-10-19 10:40:55 +01:00
rtl.rb Check site default locale if Rtl class is initialized without a user (#8417) 2019-11-26 15:01:37 -05:00
s3_helper.rb FIX: AWS S3 errors don't necessarily include a message 2020-08-12 17:00:09 -04:00
s3_inventory.rb FIX: increase inventory lag for s3 to 2 days (#11606) 2020-12-30 16:05:42 +11:00
score_calculator.rb
screening_model.rb
search.rb FIX: Search topic title headline being truncated. 2020-12-22 09:09:47 +08:00
secure_session.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
shrink_uploaded_image.rb FIX: Handle the case where upload goes missing during downsizing 2020-07-06 18:51:38 +02:00
single_sign_on.rb FEATURE: support SSO website and location overrides 2020-04-28 16:06:35 +10:00
single_sign_on_provider.rb FIX: Handle missing provider return sso url 2020-05-12 18:16:50 -06:00
site_icon_manager.rb
site_setting_extension.rb DEV: Make site setting type uploaded_image_list use upload IDs (#10401) 2020-10-13 16:17:06 +03:00
slug.rb FIX: If a prettified slug is a number, return defaultt (#8554) 2019-12-17 10:34:20 +10:00
socket_server.rb
spam_handler.rb FIX: use allowlist and blocklist terminology (#10209) 2020-07-27 10:23:54 +10:00
sql_builder.rb
staff_constraint.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
staff_message_format.rb
suggested_topics_builder.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
system_message.rb FIX: TL2 promotion message and advance training (#10679) 2020-09-22 10:17:52 +10:00
text_cleaner.rb
text_sentinel.rb FEATURE: Improve errors when title is invalid (#11149) 2020-11-11 15:11:36 +02:00
theme_javascript_compiler.rb DEV: Remove `Discourse.RAW_TEMPLATES` (#9630) 2020-05-05 12:15:03 -04:00
theme_modifier_helper.rb DEV: Allow plugins to add theme modifiers via db migrations (#9192) 2020-03-12 16:35:28 +00:00
theme_settings_manager.rb FEATURE: add support for `upload` format in theme settings. 2020-04-15 18:34:02 +05:30
theme_settings_parser.rb
theme_translation_manager.rb
theme_translation_parser.rb
timeline_lookup.rb
topic_creator.rb FIX: Users without shared drafts access can still have access to the category. (#11476) 2020-12-14 16:08:20 -03:00
topic_list_responder.rb DEV: Refactor draft attributes for `CategoryList` and `TopicList`. 2020-07-24 10:11:30 +08:00
topic_publisher.rb FIX: Use destroy_all instead of delete_all for shared drafts 2020-03-05 11:13:43 -08:00
topic_query.rb FIX: Users without shared drafts access can still have access to the category. (#11476) 2020-12-14 16:08:20 -03:00
topic_query_params.rb FIX: Build correct topic list filter (#11473) 2020-12-11 14:20:48 +02:00
topic_query_sql.rb
topic_retriever.rb FIX: An `opts` hash was not, in fact, optional :) 2020-04-20 14:17:13 -04:00
topic_subtype.rb
topic_upload_security_manager.rb FEATURE: Update upload security status on post move, topic conversion, category change (#8731) 2020-01-23 12:01:10 +10:00
topic_view.rb FEATURE: Include post number in inline Onebox titles (#11515) 2020-12-17 11:19:13 +11:00
topics_bulk_action.rb FEATURE: Create revision when bulk moving topics (#10802) 2020-11-12 13:57:12 +01:00
trust_level.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
turbo_tests.rb FIX: Made turbo_rspec display errors in shared groups correctly 2019-08-29 12:41:14 +01:00
twitter_api.rb DEV: Update rubocop-discourse from 2.3.2 to 2.4.0 (#11079) 2020-10-30 15:04:29 +01:00
unicorn_logstash_patch.rb DEV: Fix lint. 2020-07-21 15:55:03 +08:00
unread.rb DEV: Apply Rubocop redundant return style 2019-11-14 15:10:51 -05:00
upload_creator.rb FIX: Correct casing of whitelisted SVG elements (#11094) 2020-12-08 11:16:41 +11:00
upload_fixer.rb
upload_markdown.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
upload_recovery.rb DEV: Recover missing files of existing uploads (#10757) 2020-10-01 14:54:45 +02:00
upload_security.rb DEV: Fix flaky UploadSecurity spec 2020-09-18 14:36:41 -04:00
url_helper.rb PERF: Improve cook_url performance for topic thumbnails (#11609) 2020-12-30 18:13:13 +00:00
user_lookup.rb PERF: Combine avatar_lookup and primary_group_lookup into user_lookup (#10253) 2020-07-17 10:48:08 +01:00
user_name_suggester.rb FIX: allow for final sigma in suggested usernames (#11540) 2020-12-23 08:51:36 +11:00
version.rb Version bump to v2.7.0.beta1 2020-11-30 17:46:05 -05:00
webauthn.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00
wizard.rb DEV: Allow plugins to add wizard steps after specific steps (#9315) 2020-04-01 08:36:50 -05:00