mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 20:27: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
23 lines
673 B
Ruby
23 lines
673 B
Ruby
# 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
|
|
#
|