fix: Updated IMAP errors add method (#5520)

fixes: #5519
This commit is contained in:
Tejaswini Chile
2022-10-01 00:03:00 +05:30
committed by GitHub
parent 4f0360c7a2
commit 7b54990ae6
2 changed files with 14 additions and 1 deletions

View File

@@ -241,7 +241,7 @@ class Message < ApplicationRecord
end
def validate_attachments_limit(_attachment)
errors.add(attachments: 'exceeded maximum allowed') if attachments.size >= NUMBER_OF_PERMITTED_ATTACHMENTS
errors.add(:attachments, message: 'exceeded maximum allowed') if attachments.size >= NUMBER_OF_PERMITTED_ATTACHMENTS
end
def set_conversation_activity