mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 13:16:28 +08:00
690f17bcbe
* FEATURE: Allow List for PMs This feature adds a new user setting that is disabled by default that allows them to specify a list of users that are allowed to send them private messages. This way they don't have to maintain a large list of users they don't want to here from and instead just list the people they know they do want. Staff will still always be able to send messages to the user. * Update PR based on feedback
14 lines
438 B
Ruby
14 lines
438 B
Ruby
# frozen_string_literal: true
|
|
class CreateAllowedPmUsers < ActiveRecord::Migration[6.0]
|
|
def change
|
|
create_table :allowed_pm_users do |t|
|
|
t.integer :user_id, null: false
|
|
t.integer :allowed_pm_user_id, null: false
|
|
t.timestamps null: false
|
|
end
|
|
|
|
add_index :allowed_pm_users, [:user_id, :allowed_pm_user_id], unique: true
|
|
add_index :allowed_pm_users, [:allowed_pm_user_id, :user_id], unique: true
|
|
end
|
|
end
|