Remove participants limit for conversations
The limit was added in 2012 to prevent spam, but since the participants need to be a mutual contact with the author nowadays, I don't think it's a spam problem anymore.
This commit is contained in:
parent
80bfc3fcfd
commit
815cf121ab
1 changed files with 0 additions and 5 deletions
|
|
@ -9,13 +9,8 @@ class Conversation < ApplicationRecord
|
|||
has_many :participants, class_name: "Person", through: :conversation_visibilities, source: :person
|
||||
has_many :messages, -> { order("created_at ASC") }, inverse_of: :conversation
|
||||
|
||||
validate :max_participants
|
||||
validate :local_recipients
|
||||
|
||||
def max_participants
|
||||
errors.add(:max_participants, "too many participants") if participants.count > 20
|
||||
end
|
||||
|
||||
def local_recipients
|
||||
recipients.each do |recipient|
|
||||
if recipient.local?
|
||||
|
|
|
|||
Loading…
Reference in a new issue