FEATURE: Implement support for IMAP and SMTP email protocols. (#8301)

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
Dan Ungureanu
2020-07-10 12:05:55 +03:00
committed by GitHub
parent e88b17c044
commit c72bc27888
43 changed files with 1956 additions and 128 deletions

View File

@ -200,6 +200,7 @@ class Topic < ActiveRecord::Base
has_many :ordered_posts, -> { order(post_number: :asc) }, class_name: "Post"
has_many :topic_allowed_users
has_many :topic_allowed_groups
has_many :incoming_email
has_many :group_archived_messages, dependent: :destroy
has_many :user_archived_messages, dependent: :destroy
@ -866,7 +867,8 @@ class Topic < ActiveRecord::Base
no_bump: opts[:bump].blank?,
topic_id: self.id,
skip_validations: true,
custom_fields: opts[:custom_fields])
custom_fields: opts[:custom_fields],
import_mode: opts[:import_mode])
if (new_post = creator.create) && new_post.present?
increment!(:moderator_posts_count) if new_post.persisted?