Commit 815cf121 authored by Benjamin Neff's avatar Benjamin Neff Committed by Dennis Schubert

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.
parent 80bfc3fc
......@@ -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?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment