2016-11-25 16:57:20 +00:00
|
|
|
# frozen_string_literal: true
|
2016-12-08 21:22:43 +00:00
|
|
|
|
|
|
|
# notification codes to differentiate different types of notifications
|
|
|
|
# e.g. a notification might have {
|
|
|
|
# notified_object_type: 'Map',
|
|
|
|
# notified_object_id: 1,
|
|
|
|
# notification_code: MAILBOXER_CODE_ACCESS_REQUEST
|
|
|
|
# },
|
|
|
|
# which would imply that this is an access request to Map.find(1)
|
|
|
|
MAILBOXER_CODE_ACCESS_REQUEST = 'ACCESS_REQUEST'
|
2016-12-13 07:42:33 +00:00
|
|
|
MAILBOXER_CODE_ACCESS_APPROVED = 'ACCESS_APPROVED'
|
|
|
|
MAILBOXER_CODE_INVITE_TO_EDIT = 'INVITE_TO_EDIT'
|
2016-12-08 21:22:43 +00:00
|
|
|
|
2016-11-01 03:18:27 +00:00
|
|
|
Mailboxer.setup do |config|
|
2016-11-25 16:57:20 +00:00
|
|
|
# Configures if your application uses or not email sending for Notifications and Messages
|
2016-11-01 03:18:27 +00:00
|
|
|
config.uses_emails = true
|
|
|
|
|
2016-11-25 16:57:20 +00:00
|
|
|
# Configures the default from for emails sent for Messages and Notifications
|
2016-12-09 19:38:05 +00:00
|
|
|
config.default_from = 'team@metamaps.cc'
|
2016-11-01 03:18:27 +00:00
|
|
|
|
2016-11-25 16:57:20 +00:00
|
|
|
# Configures the methods needed by mailboxer
|
2016-11-01 03:18:27 +00:00
|
|
|
config.email_method = :mailboxer_email
|
|
|
|
config.name_method = :name
|
|
|
|
|
2016-11-25 16:57:20 +00:00
|
|
|
# Configures if you use or not a search engine and which one you are using
|
|
|
|
# Supported engines: [:solr,:sphinx]
|
2016-11-01 03:18:27 +00:00
|
|
|
config.search_enabled = false
|
|
|
|
config.search_engine = :solr
|
|
|
|
|
2016-11-25 16:57:20 +00:00
|
|
|
# Configures maximum length of the message subject and body
|
2016-11-01 03:18:27 +00:00
|
|
|
config.subject_max_length = 255
|
2016-11-25 16:57:20 +00:00
|
|
|
config.body_max_length = 32_000
|
2016-11-01 03:18:27 +00:00
|
|
|
end
|