discourse/app/models/allowed_pm_user.rb
Blake Erickson 690f17bcbe
FEATURE: Allow List for PMs ()
* 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
2020-07-20 15:23:49 -06:00

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
#