From 815cf121abf45980d243ac52740dee8dc3ac6944 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 27 Jan 2018 02:34:25 +0100 Subject: [PATCH] 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. --- app/models/conversation.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/models/conversation.rb b/app/models/conversation.rb index 5197ebd71..bb7cc1f3b 100644 --- a/app/models/conversation.rb +++ b/app/models/conversation.rb @@ -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?