- feature to store contact IP for accounts
- IP lookup through geocoder gem
- ability to do IP lookup through external APIs
- add commit hook to prevent push to develop and master
- migrations to fix default values for jsonb columns
- Introduce models & migrations for portals, categories, folders and articles
- CRUD API for portals
- CRUD API for categories
Addresses: #714
Co-authored-by: Sojan <sojan@pepalo.com>
* feat: added support mailbox to handle email channel (#140)
Added a new mailbox called 'SupportMailbox' to handle all the
incoming emails other than reply emails.
An email channel will have a support email and forward email
associated with it. So we filter for the right email inbox based on
the support email of that inbox and route this to this mailbox.
This mailbox finds the account, inbox, contact (create a new one
if it does not exist) and creates a conversation and adds the
email content as the first message in the conversation.
Other minor things handled in this commit:
* renamed the procs for routing emails in application mailbox
* renamed ConversationMailbox to ReplyMailbox
* Added a fallback content in MailPresenter
* Added a record saving (bang) versions of enabling and disabling
features in Featurable module
* added new factory for the email channel
refs: #140
* Bugfix: Private notes in emails
Private notes were sent in the emails as part of
conversation continuity. Fixed this issue.
Also made the changes to not even queue the mails
if message is a private note.
* Bugfix: Change issue with featurable in signup - passing array
* Bugfix: Added specs for checking private notes being sent in email
* Chore: Feature lock email settings in UI
The email settings under account settings needed to be
feature locked in a way different from teh current way for it
to be enabled for accounts in a self hosted scenario.
Some refactorings were also done along with this change.
1. There was a feature flag defined in code in account model called
domain_emails_enabled was used to check if the inbound emails was
enabled for the account. But there was already a feature flag called
"inbound_emails" defined in features.yml. So changed to use this to
check if inbound emails are enabled for an account.
2. Renamed and re-purposed existing `domain_emails_enabled` to
`custom_email_domain_enabled` to use for feature toggling the UI
for email settings.
3. To enable & disable multiple features using the featurable concern
we were passing an array of values. Changed this to accept a comma
separated set of values.
* Chore: Feature lock email settings in UI
Fixed the specs for accounts controller & removed
unneccessary code from Account seetings component in UI
* Chore: Convert newlines to <br>s
Removed the layout used while sending replies in
conversation continuity.
Converted the newlines in the messages to <br/> tags
for the correct HTML rendering.
* Chore: Bug fix in reply email domain
Renamed the function custom_email_domain_enabled to
inbound_email_enabled.
Fixed bug on setting reply emails's domain.
- Update sidebar design
- Move every contact data to contacts module
- Revert go to next conversation feature
- Fix issues with new conversation in action cable
- Escape HTML content
- Broadcast event when conversation.contact changes.
Co-authored-by: Sojan <sojan@pepalo.com>
* Feature: Introduce Super Admins
- added new devise model for super user
- added administrate gem
- sample dashboards for users and accounts
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
* Renamed concern from Feature to Featurable
* Feature: Installation config (#839)
* Added new model installtion config with corresponding migrations and specs
* Created an installation config yml (key value store model)
* Created a config loader module to load the installaltion configs
* Added this to the config loader seeder
* Changed the account before create hook for default feature enabling to use the feature values from installtion config
* Renamed the feature concern to Featurable to follow the naming pattern for concerns
* Added comments and specs for modules and places that deemed necessary
* Refactored config loader to reduce cognitive complexity (#839)
* Feature: Feature flags on account (#814)
* Added the new column on account model for managing feature flags
* Added the inbound email flag
* Locked the settings of this eature in account settings based on this
* Encapsulated the feature flaging as a concern. With this, we can re-use the same concern if we introduce this in other models like user or inbox or so.
* Added the features in the account api
* Changed Rails/FilePath style - rubocop issue
* Revert "Changed Rails/FilePath style - rubocop issue"
This reverts commit 3a42d3b9c9b3a2fde8bc7256fd704b6fcaf54040.
* Disabling rubocop on codeclimate as we already have this in CICD
* Added POC for mail inbox reply email
* created mailbox and migratuion for the same
* cleaned up sidekiq queues and added the queues for action mailbox and active storage
* created conversation mailbox and functionlaity to create a message on the conversation when it's replied
* Added UUID to conversation to be used in email replies
* added migration to add uuid for conversation
* changed parsing and resource fetching to reflect matching uuid and
loading conversation alone
* cleaned up conversation mailbox.rb
* Added content type & attribute for message
* Added the new reply email to outgoing emails
* Added migration to accounts for adding domain and settings
* Modified seeds to reflect this changes
* Added the flag based column on account for boolean settings
* Added the new reply to email in outgoing conversation emails based on conditions
* Added dynamic email routing in application mailbox
* Added dynamic email routing in application mailbox
* Added a catch all deafult empty mailbox
* Added annotation for account
* Added the complete email details & attachments to the message
* Added the complete email details to the message in content_attributes, like subject, to, cc, bcc etc
* Modified the mail extractor to give a serilaized version of email
* Handled storing attachments of email on the message
* Added incoming email settings, env variables
* [#138] Added documentation regarding different email settings and variables
* Fixed the mail attachments blob issue (#138)
* Decoided attachments were strings and had to construct blobs out fo them to work with active storage
* Fixed the content encoding issue with mail body
* Fixed issue with Proc used in apllication mailbox routing
* Fixed couple of typos and silly mistakes
* Set appropriate from email for conversation reply mails (#138)
* From email was taken from a env variable, changed it to take from account settings if enabled
* Set the reply to email correctly based on conversation UUID
* Added commented config ind development.rb for mailbox ingress
* Added account settings for domain and support email (#138)
* Added the new attributes in accounts controller params whitelisting, api responses
* Added options for the the new fields in account settings
* Fixed typos in email continuity docs and warnings
* Added specs for conversation reply mailer changes (#138)
* Added specs for
* conversation reply mailer
* Accounts controller
* Account and Conversation models
* Added tests for email presenter (#138)
* Specs for inbound email routing and mailboxes (#138)
* Chore: Webwidget Inbox Tech Debts
* Additional customization options creating Web Widget
* Changes to edit Page for Web Widget
* Remove the WebWidget API end points
* Minor chores
Address: #680, #502
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
* Changes for the message to have multiple attachments
* changed the message association to attachments from has_one to has_many
* changed all the references of this association in building and fetching to reflect this change
* Added number of attachments validation to the message model
* Modified the backend responses and endpoints to reflect multiple attachment support (#737)
* Changing the frontend components for multiple attachments
* changed the request structure to reflect the multiple attachment structures
* changed the message bubbles to support multiple attachments
* bugfix: agent side attachment was not showing because of a missing await
* broken message was shown because of the store filtering
* Added documentation for ImageMagick
* spec fixes
* refactored code to reflect more apt namings
* Added updated message listener for the dashboard (#727)
* Added the publishing for message updated event
* Implemented the listener for dashboard
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
* Ability to change the account name
* Ability to set a language to the account
Addresses: #667#307
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
* Update conversation's updated_at when a message is created/saved
* changed teh ordering of conversation to be based on `updated_at` rather than `created_at`
Addresses: #402
- migrations to split roles and other attributes from users table
- make changes in code to accommodate this change
Co-authored-by: Sojan Jose <sojan@pepalo.com>
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
* [#139] Delayed emails for conversations
* Added the setex and get methods to Redis wrapper
* Set the priorities for the sidekiq queues
* Was not able to use mailhog for testing email in local, switched back to letter opener and added comments on using the SMTP settings
* Added after create hood in messages to queue the sending of mail after 2 minutes using sidekiq worker and also set the redis key for the conversation to avoid the email sending for every message
* Added the sidekiq worker to send the email and delete the conversation redis key
* Added the mailer and mail template
* mailer sends the last 10 messages along with the new messages from the time it was queued
* Send email only in development or if smtp config is set
* Send email only in development or if smtp config is set
* Set the SMTP_PORT in production variable
* Adding redis to circle CI
* Specs for the conversation email changes
* Added specs for conversation email sidekiq worker
* Added specs for conversation mailer
* Added specs in message model for the after create hook for notify email
* Send emails only when there is a reply from agent
* set development to use mailhog
* Adding comments for using letter opener
* Refactor: Inbox store, remove inboxes from sidebar
* Add a new page for inbox settings
* Show inboxes on sidebar
* Add inbox_members API
* Disable similar-code check
* Fix codeclimate scss issues
* Add widget_color update API and actions
* Add specs for inbox store
* Fix Facebook auth flow
* Fix agent loading, inbox name
* add sidekiq web view if the user is an administrator
* add sidekiq setup configuration and support
* update devise to use delivery_later method and update test
* update conversation to use deliver_later instead of deliver
* Update Routes
* Add Procfile for Heroku One-Click Start
* updating docs
* update concurrency and Procfile for supporting Heroku Free Dyno
* update Procfile.dev
- api to update name and email
- api to change password
- api to set profile pic
- fixes update_attribute! deprecation warning
- introducing active storage
* Add annotate gem to the project
* Annotate models, fixtures, factories and model_specs
* Keep annotations only in Models
* Remove unwanted changes in model specs
* Exclude auto_annotate_models from rubocop
* #251 - Disable subscription in community edition
* Hide billing routes in sidebar for community edition
* Remove subscription serializer if billing disabled
* Add base Inbox association and validation specs
* `#facebook?``
* `#add_member` and `#remove_member`
* cleanup
* Rubocop
* Rubocop but again
really this time
* Add `invited_by` foreign key to User
Allows for a User to be tied to the user who invited them
* Include `current_user` in new agent initialization parameters
* Add `shoulda-matchers` for testing associations
* Add Inviter information and associated account to welcome email
* Only show inviter info if applicable
* Update conversation spec for FFaker compatibility
* Add Conversation factory with dependent factories
* Include FactoryBot methods in rspec config
* Add unit tests for public methods of Conversation model
* Move Current model into a separate file in lib folder
* Disable Metrics/BlockLength rule for db/migrate and spec folders
* Get rid of global $dispatcher variable
* Create Message#unread_since scope
* Refactor callback methods in Conversation model
* Create Conversations::EventDataPresenter
* Add translation keys for activity messages
* Add pry-rails gem
* Refactor Conversation#notify_status_change
* Add mock_redis for test env