mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Allow List for PMs (#10270)
* 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
This commit is contained in:
22
app/models/allowed_pm_user.rb
Normal file
22
app/models/allowed_pm_user.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AllowedPmUser < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
belongs_to :allowed_pm_user, class_name: "User"
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: allowed_pm_users
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# user_id :integer not null
|
||||
# allowed_pm_user_id :integer not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_allowed_pm_users_on_allowed_pm_user_id_and_user_id (allowed_pm_user_id,user_id) UNIQUE
|
||||
# index_allowed_pm_users_on_user_id_and_allowed_pm_user_id (user_id,allowed_pm_user_id) UNIQUE
|
||||
#
|
||||
Reference in New Issue
Block a user