Commit graph

73 commits

Author SHA1 Message Date
Pranav Raj S
272c481464
Feature: Create conversations from Tweets (#470)
* Feature: Add tweets to conversations
2020-02-09 15:47:48 +05:30
Pranav Raj S
607fc25723
Bugfix: Fix copy in agent availability status (#466)
Copy update for agent status
2020-02-05 12:11:33 +05:45
Pranav Raj S
a9c304f1ef
Feature: Twitter DM Integration (#451)
An initial version of twitter integration

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2020-02-03 00:54:00 +05:45
Anto Dominic
6325acd183 Feature: Add Sidekiq docker (#443)
* update db:schema due to migration

* reduce default concurrency for redis connection limit

* Allow auto update packages in the development mode without building image

* add sidekiq support to docker-compose

* Pass sidekiq cofig file

* passed the env file in base image rather than separately in rails, web packer and sidekiq in docker-compose
* removed un-necessary changes in schema
* changed concurrency to finer values
* removed default size set in sidekiq redis config
* Added the sidekiq config option in Procfile.dev

Co-authored-by: Sony Mathew <ynos1234@gmail.com>
2020-01-27 00:15:13 +05:45
sony-mathew
8cf135f2db Merge branch 'hotfix/1.0.3' into develop
# Conflicts:
#	config/cable.yml
#	docs/development/environment-setup/docker.md
2020-01-26 22:51:39 +05:45
sony-mathew
2168f823a5 [#446] Redis authentication support
Previously we did not support authentication for redis anywhere. Also in the docker compose we were exposing redis port 6379 without any authentication. In the app side for the connections that app server (for storing keys as well as for socket connections made using action cable) and Sidekiq were making to redis server did not support authentication.

With this commit, we support authentication for redis connections from app side and Sidekiq. This is supported in docker-compose as well.

The changes include :
* Added support for new env variable REDIS_PASSWORD
* This redis password is now supported by action cable connections, Sidekiq connections and app side redis connections
* Since Sidekiq did not have an initializer, added an initializer to pass custom config to Sidekiq (for now it's options for redis)
* Changes in docker-compose to pickup a password set in .env file to protect the redis server running in docker
* Added necessary documentation changes in `docker.md` and `environment-variables.md`
2020-01-26 22:46:34 +05:45
Sony Mathew
d4b3ba4baa [#139] Send conversation emails (#442)
* [#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
2020-01-23 23:14:07 +05:45
Sojan Jose
f875a09fb7 Chore: Switch from Carrierwave to ActiveStorage (#393) 2020-01-07 22:59:17 +05:30
Sojan Jose
6a2f4e6673 Chore: Ability to configure Mailer sender emails [#339] (#342)
* Chore: Ability to configure Mailer sender emails [#339]

fixes : #339
fixes : #330

* update the documentation
2019-12-03 22:54:08 +05:30
Sony Mathew
da9ac8b26d 🔥Docker and environment variables cleanup (#270)
* Added dotenv-rails gem to manage environment variables

* Added dotenv-rails gem to manage environment variables
* Removed figaro which was used earlier for this purpose

* Standardized variable names

* Changed all env variables to be upper case. This included changes in files referencing env variables.
* Added example env file with all variables set to empty value
* Removed the earlier setup of copying application.yml and database.yml and the scripts and documentation associated to this

* Docker setup

* Added docker file for building the docker images
* Added entrypoint.sh script which is referenced inside the Docker image
* Cloned the Procfile for development using docker which has slight change compared to regular procfile
* Added the docker-compose.yml which has 3 service's configuration, postgres, redis and chatwoot server and a mounted volume for postgres

* Added docker related info to documentation

* Added the docker setup info in the documentation
* Added info for using`rbenv` instead of rvm for managing ruby versions
* Updated the documentation for environment variables to have one about `dotenv-rails` gem and removed the documentation about the old copy paste method used by figaro

* Changing the postgres database, username and password as environment variables

* Removed database.yml from gitignore
* Made the postgres databse, username and password as environemnt variables
* Added this in documentation

* Added a quick setup page

* Added quick setup page
* Removed the docs from README and added link to the docs in website
* Removed the figaro related things from circle.ci config

* Adding external volume for redis in docker compose

* Added instructions for adding the redis volume in docs
2019-11-24 01:27:39 +05:30
Pranav Raj S
f4358d9993 Replace pusher with action cable (#178)
closes #43
2019-10-25 01:37:01 +05:30
Sojan Jose
2099dc01a6
Routine weeding of the codebase (#163)
* Routine weeding of the codebase
* fix the spec
2019-10-20 16:19:12 +05:30
Pranav Raj S
94c6d6db6f
🚨Fix Rubocop lint errors 2019-10-20 14:17:26 +05:30
Sojan Jose
a7da2428b0
upgrade facebook messenger gem (#159)
- carrierwave local config
- upgrade facebook messenger gem to support facebook graph api 4.0
2019-10-20 01:41:24 +05:30
Sojan Jose
addb370915 Remove Stale Gems 2019-10-17 00:51:50 +05:30
Emil Shakirov
4768aca484 Refactor Conversation model (#134)
* 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
2019-10-12 23:38:41 +05:30
Pranav Raj Sreepuram
f74a6593ef Cleanup message model, fix reporting listener issues 2019-08-31 04:08:00 +05:30
Sojan Jose
5697b81d78 Fix the circle builds (#20) 2019-08-26 08:42:17 +05:30
subintp
aa8a43344b Configure redis 2019-08-21 22:38:08 +05:30
Sojan Jose
52194116b3 Upgrade to rails 6 💎 (#11)
- upgraded to rails 6
- fixes various issues
2019-08-19 13:49:57 +05:30
Pranav Raj Sreepuram
e743abd867 Move image upload to S3 2019-08-18 01:53:55 +05:30
Pranav Raj Sreepuram
4fceb59eb2 Add mailer templates, remove unused devise controllers 2019-08-17 18:05:50 +05:30
Pranav Raj Sreepuram
2a34255e0b Initial Commit
Co-authored-by: Subin <subinthattaparambil@gmail.com>
Co-authored-by: Manoj <manojmj92@gmail.com>
Co-authored-by: Nithin <webofnithin@gmail.com>
2019-08-14 15:18:44 +05:30