mirror of
https://github.com/discourse/discourse.git
synced 2026-08-10 23:59:31 +08:00
The "Encrypts PM if available" checkbox in automation script options was a leftover from the discourse-encrypt plugin, which was archived almost a year ago. Since `EncryptedPostCreator` no longer exists, the option had no effect - the code always fell back to using the regular `PostCreator`. This removes all traces of the `prefers_encrypt` feature: - The checkbox UI in the PM field component - The `prefers_encrypt` parameter from `Utils.send_pm` - References in send_pms and gift_exchange scripts - The column from the pending_pms table (via post-deploy migration) - Associated translations and tests The column removal follows the standard two-phase approach: first declaring `ignored_columns` in the model, then dropping the column in a post-deploy migration. Ref - https://meta.discourse.org/t/-/392664
27 lines
843 B
Ruby
Vendored
27 lines
843 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module DiscourseAutomation
|
|
class PendingPm < ActiveRecord::Base
|
|
# TODO: Remove after 20260106102330_drop_prefers_encrypt_from_pending_pms has been promoted
|
|
self.ignored_columns = %w[prefers_encrypt]
|
|
|
|
self.table_name = "discourse_automation_pending_pms"
|
|
|
|
belongs_to :automation, class_name: "DiscourseAutomation::Automation"
|
|
end
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: discourse_automation_pending_pms
|
|
#
|
|
# id :bigint not null, primary key
|
|
# execute_at :datetime not null
|
|
# raw :string
|
|
# sender :string
|
|
# target_usernames :string is an Array
|
|
# title :string
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# automation_id :bigint not null
|
|
#
|