diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2018-01-27 04:34:25 +0300 |
---|---|---|
committer | Dennis Schubert <mail@dennis-schubert.de> | 2018-02-02 01:35:35 +0300 |
commit | 815cf121abf45980d243ac52740dee8dc3ac6944 (patch) | |
tree | 452d4c5e116351cf2495900f43b9b1f8c2d77ef8 | |
parent | 80bfc3fcfdb16f7d425c82a86e497c14587209fd (diff) |
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.
-rw-r--r-- | app/models/conversation.rb | 5 |
1 files changed, 0 insertions, 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? |