Compare commits

...
1714 Commits
Author SHA1 Message Date
Sojan 3eee74cb1a Merge branch 'release/2.8.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-08-16 17:33:28 +05:30
Sojan cc8625ca75 Bump version to 2.8.0 2022-08-16 17:31:55 +05:30
Sojan JoseandGitHub fc8c7a7107 chore: New Translation updates (#5235) 2022-08-16 17:06:21 +05:30
Sojan JoseandGitHub 2ecb2ca0f0 feat: Enable Capacity Config UI (#5164)
- Enables Capacity Config in UI
- Rewrite auto assignment Logic to consider only online agents

fixes: #4990
2022-08-16 16:58:23 +05:30
287f0a6de0 Fix: Truncate overflowing dashboard apps text (#5221)
* Truncate overflowing text

* Update app/javascript/dashboard/routes/dashboard/settings/integrations/DashboardApps/DashboardAppsRow.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Fix overflowing content

* Reviwe changes

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-08-16 16:37:52 +05:30
Vishnu NarayananandGitHub 3cb72242de feat: add gh action for linux nightly installer (#5191)
* feat: add gh action for nightly installer


Signed-off-by: Vishnu Narayanan <vishnu@chatwoot.com>
2022-08-16 11:04:09 +05:30
Sojan JoseandGitHub ecb1f57efe chore: Improve memory usage in RemoveStaleNotificationsJob (#5271)
The job we introduced recently for removing the stale migrations would time out in instances with a large amount of deleted data.
So improving it for better memory utilization.
2022-08-15 19:58:42 +05:30
Tejaswini ChileandGitHub 2397326324 fix: Auto populate team after assigned via API (#5250) 2022-08-12 13:40:28 +05:30
Sojan JoseandGitHub 831a3bcd50 chore: Fix RemoveStaleNotificationJob query (#5242)
Rubocop amended the query in #5236, which led to failure as the Message model already has a default scope.
This PR fixes it.
2022-08-10 15:08:37 +02:00
Sojan JoseandGitHub 74fdfffe08 fix: Notification page breakages (#5236)
- Remove the cascading foreign key indexes
- Add migration to clean up existing objects

fixes: #4285
2022-08-10 13:46:46 +02:00
Sivin VargheseandGitHub 12b6fb211a feat: Created article settings side panel (#5197) 2022-08-10 11:58:19 +05:30
9bc75225fe feat: Category store integration (#5218)
* Add more actions

* Complete sidebar store integration

* Complete portal list store integration

* Fixed the specs

* Added missing specs

* Add comment

* Code cleanup

* Fixed all the spec issues

* Add portal and article API specs

* Add category name in article list

* Add more locales

* Code beautification

* Exclude locale from codeclimate ci

* feat: Category store integration

* chore: Minor fixes

* chore: API call fixes

* chore: Minor fixes

* chore: Minor fixes

* chore: Adds the ability for get articles based on categories

* chore: minor fixes

* chore: Minor fixes

* chore: fixes specs and minor improvements

* chore: Review fixes

* chore: Minor fixes

* chore: Review fixes

* chore: Review fixes

* chore: Spacing fixes

* Code cleanup

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-08-10 10:48:41 +05:30
Muhsin KelothandGitHub 16ad263a3a feat: Add the ability add new portal (#5219) 2022-08-10 09:27:52 +05:30
Pranav Raj SandGitHub 657bd44418 fix: Update the relevant agent presence only (#5220) 2022-08-09 12:32:09 +05:30
Pranav Raj SandGitHub cbcee6414c fix: Update styles to fix the status filter dropdown (#5230) 2022-08-09 12:10:56 +05:30
Pranav Raj SandGitHub 27a9806817 chore: Add support for conversation_id in SSO params (#5228) 2022-08-09 00:13:06 +05:30
Pranav Raj SandGitHub 4b1bb65c92 chore: Add notification ID to tag to make it unique (#5227) 2022-08-09 00:09:11 +05:30
Sojan JoseandGitHub fe74a259be fix: assigned_conversation_new_message? NoMethod error (#5225) 2022-08-08 23:43:57 +05:30
Sojan JoseandGitHub a89a280a94 chore: Update translations from Crowdin (#5202) 2022-08-08 21:14:50 +05:30
Sojan JoseandGitHub e26c6a2de5 chore: Lock closed threads automatically (#5222) 2022-08-08 21:12:28 +05:30
Pranav Raj SandGitHub d8de16fd70 chore: Remove bourbon dependancy (#5215) 2022-08-08 21:02:29 +05:30
Muhsin KelothandGitHub 20f3568583 feat: Portals store integration (#5185) 2022-08-08 15:47:32 +05:30
Pranav Raj SandGitHub 052422ed03 chore(deps): Upgrade vuelidate to 0.7.7 (#5214) 2022-08-08 12:02:37 +05:30
Sojan JoseandGitHub 8e75b3fc2a chore: Remove stale contact presence records (#5205)
fixes: chatwoot/product#493
2022-08-05 12:51:39 +02:00
124390a019 chore: Cleanup update banner with localstorage updates (#5209)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
2022-08-05 13:46:12 +05:30
fc9699d993 feat: Add assign team option to the context menu (#5153)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-08-05 10:57:58 +05:30
giquieuandGitHub 9bea84e2b5 fix: Sending Audio messages not working in Whatsapp Cloud
To send audio via Cloud API, it is unnecessary to send the caption.

fixes: #5078
2022-08-04 18:12:40 +02:00
Pranav Raj SandGitHub b38877300c chore: Update styles in cc/bcc input (#5201) 2022-08-04 17:45:12 +05:30
Sojan JoseandGitHub 044692e475 chore: Skip reprocessing invalid Stripe events (#5200) 2022-08-04 17:21:11 +05:30
Fayaz AhmedandGitHub 7c5ee55d3e feat: Add store to manage categories (#5127) 2022-08-04 15:11:29 +05:30
d55a8f7987 chore: Add POSTGRES_DATABASE details to the env file (#5180)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-08-04 10:28:50 +05:30
Sivin VargheseandGitHub 65ac78acec feat: Add a popup component for announcements (#4615) 2022-08-03 20:49:42 +05:30
Sojan JoseandGitHub 7659197d4d chore: Update translations from Crowdin (#5192) 2022-08-03 18:26:24 +05:30
David KubešandGitHub a18c0a97f3 chore: Replace packages with native functions (#5140) 2022-08-03 17:08:21 +05:30
Sivin VargheseandGitHub 262458f07d fix: Update broken styles in the editor (#5183) 2022-08-03 15:04:32 +05:30
Sivin VargheseandGitHub f7d4f39b5c fix: Avatar renders an incorrect symbol if it has emoji (#5184) 2022-08-03 14:11:33 +05:30
Pranav Raj SandGitHub e0cebfaa1a chore: Allow super admin to suspend an account (#5174) 2022-08-03 11:40:03 +05:30
Tejaswini ChileandGitHub 4152883f38 chore: Add missing locale info in portal API (#5177) 2022-08-03 10:33:48 +05:30
Sivin VargheseandGitHub 11fe3f071e feat: Component for listing the portal (#5146) 2022-08-02 20:03:51 +05:30
Muhsin KelothandGitHub 5735a8e377 feat: Articles store integration (#5133) 2022-08-02 17:14:10 +05:30
Pranav Raj SandGitHub 82207c0d3e fix: Convert limits to Integer (#5169) 2022-08-02 15:35:51 +05:30
Tejaswini ChileandGitHub 596b611fc0 fix: search with status and author (#5152) 2022-08-02 15:28:27 +05:30
Aswin Dev P.SandGitHub d9b102cff0 feat: Widget Builder (#5104)
* feat: Add widget builder
2022-08-02 00:34:20 -07:00
substrGitHubrichardokusumasali@gmail.com <chi>
945288ce15 fix: Trim search parameter value on contacts controller (#5114)
Co-authored-by: richardokusumasali@gmail.com <chi>
2022-08-01 19:59:27 +05:30
Sojan JoseandGitHub 8db5a528ef chore: Roundrobin should consider auto-offline false config (#5160)
Previously round-robin conversation assignment logic wasn't considering the case where the Agent who had auto-offline config set as false.

fixes: #4780
2022-08-01 15:32:34 +02:00
2c372fe315 feat: Improve email rendering, introduce a new layout for emails (#5039)
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2022-08-01 10:53:50 +05:30
Sivin VargheseandGitHub ef9ea99b91 feat: Opening and closing portal switch (#5126) 2022-07-28 14:52:05 +05:30
Tejaswini ChileandGitHub 41df70fb96 chore: Add articles metadata (#5125) 2022-07-28 13:59:16 +05:30
7f48cffeb3 feat: Support case insensitive tags for Slack note prefix (#5123)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-07-28 09:57:39 +05:30
Tejaswini ChileandGitHub 21912155f2 chore: adding env example for direct_upload (#5130) 2022-07-27 20:03:33 +05:30
Fayaz AhmedandGitHub 806e5efd7a Portals Popover component (#5052)
* Portal Switch component

* Review fixes

* Update storybook props

* Review changes

* Popover component

* Review changes and moved the files to helpcenter folder
2022-07-27 14:37:55 +05:30
Fayaz AhmedandGitHub ce66b31422 feat: Portal Switch component (#5008) 2022-07-27 13:56:49 +05:30
Muhsin KelothandGitHub 6368f9106a feat: Article list view page (#5122) 2022-07-27 13:08:27 +05:30
6295f5fd61 feat: Add store to manage Articles (#5048)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-07-27 12:29:11 +05:30
bfca4852c8 feat: Create store to manage Portals (#5020)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-07-27 12:24:43 +05:30
1594d49a70 Chore: Add link to product docs on sidebar (#5119)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-07-27 10:49:06 +05:30
Tejaswini ChileandGitHub f6891aebbb fix: Set account default language in account API (#5086) 2022-07-26 22:42:20 +05:30
Sivin VargheseandGitHub 699b01c1d1 fix: Console warnings from help-center routes (#5117) 2022-07-26 19:59:46 +05:30
Tejaswini ChileandGitHub 6a4c0a1578 feat: Execute macro actions, for the conversation (#5066) 2022-07-26 12:41:22 +05:30
Muhsin KelothandGitHub bd7a56061e feat: Create category component (#5103) 2022-07-26 12:15:01 +05:30
92bb84127b feat: Creates view for edit/new article page (#5061)
* feat: Creates view for edit/new article page

* chore: Minor fixes

* chore: Minor fixes

* Update HelpCenterLayout.vue

* chore: Minor fixes

* chore: Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-07-26 11:39:53 +05:30
2082409657 feat: Add support for right click context menu in conversations (#4923)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-07-26 10:47:28 +05:30
Pranav Raj SandGitHub d57dc41cee fix: Do not reset the scroll if there is no new message (#5108) 2022-07-26 10:40:21 +05:30
Sojan JoseandGitHub 885fcf667c chore: Enable Thai language (th), update translations (#5095) 2022-07-26 09:52:59 +05:30
Tejaswini ChileandGitHub ffec427513 fix: mention notification mail for empty contact name (#5091) 2022-07-22 15:37:24 +05:30
Sojan JoseandGitHub 8acba37baf chore: Add specs for stripe Webhooks endpoint (#5087) 2022-07-22 11:46:31 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a946c06fc4 chore(deps): bump terser from 4.8.0 to 4.8.1 (#5069)
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 11:41:14 +02:00
Kyle McLarenandGitHub bc3e7d2b5e chore: Support for Elastic APM (#5004)
This PR adds support for Elastic APM for APM and Tracing in self-hosted installations.
Configuration can be done via the ELASTIC_APM_SERVER_URL and ELASTIC_APM_SECRET_TOKEN env variables.

fixes: #4999
2022-07-22 11:39:37 +02:00
Tejaswini ChileandGitHub 5727928600 fix: help center clearing minor bugs (#5075) 2022-07-22 15:01:07 +05:30
Pranav Raj SandGitHub 32291f4f7d fix: Update browser_language logic to include all languages (#5090) 2022-07-22 13:14:17 +05:30
Sojan JoseandGitHub 6a6a37a67b chore: Ability to Disable Gravatars (#5027)
fixes: #3853

- Introduced DISABLE_GRAVATAR Global Config, which will stop chatwoot from making API requests to gravatar
- Cleaned up avatar-related logic and centralized it into the avatarable concern
- Added specs for the missing cases
- Added migration for existing installations to move the avatar to attachment, rather than making the API that results in 404.
2022-07-21 19:27:12 +02:00
Sivin VargheseandGitHub 6105567238 enhancement: Uses bold font-weight for unread notifications (#5073) 2022-07-20 14:41:03 +05:30
Pranav Raj SandGitHub cd5e0c548c fix: Do not enqueue job if it is already enqueued (#5068) 2022-07-19 21:12:31 +05:30
Pranav Raj SandGitHub 7fc0d166e8 feat: Allow SaaS users to manage subscription within the dashboard (#5059) 2022-07-19 19:04:17 +05:30
Tejaswini ChileandGitHub 0cee42a9f9 feat: Macros CRUD api (#5047) 2022-07-19 17:37:00 +05:30
c4b2005425 feat: Component for editing an article (#5032)
* feat: Component for editing an article

* chore: font fixes

* chore: Review fixes

* chore: fixes conflicts

* Update app/javascript/dashboard/components/helpCenter/EditArticle.vue

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>

* chore: Review fixes

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-07-19 09:28:19 +05:30
Chad BurggrafandGitHub 558e3c7499 fix: Catch audio context errors (#5051)
Prevent errors in decoding and playing sounds from propagating
by catching them in the promise chain.

Fixes #4281.
2022-07-19 08:59:50 +05:30
Pranav Raj SandGitHub 1dc7ce526e chore: Add ee helper, custom_attributes to account (#5058) 2022-07-19 00:33:06 +05:30
Sojan d8140db2e8 Merge branch 'release/2.7.0' into develop 2022-07-18 16:48:23 +02:00
Sojan 628f40c2ab Merge branch 'release/2.7.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-07-18 16:48:01 +02:00
Sojan 5d674dddfe Bump version to 2.7.0 2022-07-18 16:41:44 +02:00
Tejaswini ChileandGitHub 00dc65ef73 fix: Twilio validation over blank messaging_service_sid (#5055) 2022-07-18 20:02:37 +05:30
SimonandGitHub fd44f9f28a chore: add file size to response (#5054)
Add file_size to the attachment response to display the file size in chat.

Fixes: #4992
2022-07-18 15:21:24 +02:00
f004db3d26 feat: New sidebar component for help-center (#5017)
* feat: New sidebar component for help-center

* chore: Review fixes

* chore: Minor fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-07-18 11:16:36 +05:30
Muhsin KelothandGitHub 21a8b79aa5 feat: Article table component (#5018) 2022-07-18 10:47:15 +05:30
Sojan JoseandGitHub bba3475083 chore: Update Crowdin translations (#5022) 2022-07-15 18:35:03 +07:00
Vishnu NarayananandGitHub 18d9bd8359 feat: add -I option to cwctl and modify -i option (#5045)
* feat: add -I option to cwctl and modify -i option

Modify -i option to drop support for installing specified branch
-i will always default to installing the latest stable branch(master)

Add -I option to support installing Chatwoot with a custom branch

* chore: minor fixes
2022-07-15 16:17:52 +05:30
Sivin VargheseandGitHub a4e21f2c47 fix: Avoid text overflow with notification content (#5035) 2022-07-15 16:27:27 +07:00
Sojan JoseandGitHub 4187428729 chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
Sojan JoseandGitHub ea1a27c7d4 fix: Twilio channel selection when MessagingServiceSid is empty (#5040)
- Fixes channel selection logic in incoming_message_service for Twilio messages

ref: #4242
2022-07-14 15:16:07 +02:00
Vishnu NarayananandGitHub b7c2159274 chore: Improve output of cwctl -w option (#5037) 2022-07-14 14:13:33 +05:30
Pranav Raj SandGitHub 8dd0d514fd feat: Init HelpCenter Routes (#5034) 2022-07-14 10:31:36 +07:00
Tejaswini ChileandGitHub d7be0ea08e fix: Conversation filter on dates (#5024) 2022-07-13 10:08:24 +05:30
Sojan JoseandGitHub 8f8a1813bf chore: Fix puma configuration (#5023)
Fixes the console warning: 

`` `
WARNING: Detected running cluster mode with 1 worker.
Running Puma in cluster mode with a single worker is often a misconfiguration.
! Consider running Puma in single-mode (workers = 0) in order to reduce memory overhead.
```
2022-07-12 12:27:33 +02:00
giquieuandGitHub 827f977a37 feat: Update API for contact avatar (#4719)
Added the ability to update the contact's avatar via API and Dashboard.

- Contact create and update APIs can now accept avatar attachment parameters [form data].
- Contact create and update endpoints can now accept the avatar_url parameter.[json]
- API endpoint to remove a contact avatar.
- Updated Contact create/edit UI components with avatar support

Fixes: #3428
2022-07-12 10:03:16 +02:00
Fayaz AhmedandGitHub 68fcd28751 chore: Add key for referrer link (#5021) 2022-07-12 09:46:39 +02:00
Pranav Raj SandGitHub d1bd829bc0 fix: Update yarn.lock file to fix deployment issue (#5019) 2022-07-12 13:58:57 +07:00
Sojan JoseandGitHub 05db053f60 chore: fix schema error from PR merges (#5016) 2022-07-11 20:12:48 +02:00
Sojan JoseandGitHub da12a39321 chore: New translation updates (#5001)
New translation updates
2022-07-11 19:14:37 +02:00
Muhsin KelothandGitHub ce1f69b2bc feat: Article item component (#5007) 2022-07-11 13:46:42 +05:30
Tejaswini ChileandGitHub 23ac1c0334 feat: Added portal logo and the updated the JSON (#4996) 2022-07-11 12:43:24 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9d4b77533e chore(deps): bump moment from 2.29.2 to 2.29.4 (#5005)
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-10 14:01:19 +07:00
Fayaz AhmedandGitHub b9eb9a5e48 feat: Support square variants of thumbnail and avatar components (#5003) 2022-07-09 14:03:55 +05:30
Sivin VargheseandGitHub 43f46e96d4 feat: Header for help-center pages (#4987) 2022-07-08 21:19:19 +05:30
Vishnu NarayananandGitHub 1bb9556c86 fix: non-zero exit on --logs and handle no opts (#5006)
* fix: non-zero exit on --logs and handle no opts

* chore: update cwctl version + add utm_source
2022-07-08 18:49:27 +05:30
Jordan BroughandGitHub 49d08a6773 feat: Support Twilio Messaging Services (#4242)
This allows sending and receiving from multiple phone numbers using Twilio messaging services

Fixes: #4204
2022-07-08 18:20:07 +05:30
Tejaswini ChileandGitHub fdf449dc87 Feat: Article public apis (#4955) 2022-07-08 17:24:38 +05:30
Aswin Dev P.SandGitHub 13a4e0e6d9 chore: Email improvements. (#4901)
* Update email processing logic.
* Fix sentry issues
2022-07-08 04:13:24 -07:00
Aswin Dev P.SandGitHub 19c637eb33 chore: Fix sentry issues (#4940)
Fixes: #4810
2022-07-08 15:09:06 +05:30
ef1d117717 feat: Add the ability to create dashboard apps from the UI (#4924)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-07-08 15:55:32 +07:00
Sojan JoseandGitHub e4b159dd54 chore: Fix contact model silently discarding invalid attributes (#4994)
fixes: #4775
2022-07-08 13:58:09 +05:30
Pranav Raj SandGitHub bca347149a feat: Add responsive tab styles (#4997) 2022-07-08 13:53:01 +07:00
Sojan JoseandGitHub 181d7797a2 chore: New translation updates (#4980)
New translation updates
2022-07-07 21:07:19 +05:30
Sojan JoseandGitHub f014d9d13b chore: Ability to Disable Sentry Transactions (#4989)
fixes: #4866
2022-07-07 20:37:05 +05:30
Tejaswini ChileandGitHub 2f3bdbdea2 fix: Handling facebook client error for deleted story (#4984) 2022-07-07 18:02:18 +05:30
SimonandGitHub 91d9584fcb feat: show HMAC and enforcement for identity validation for API inbox (#4807)
Display HMAC token in Settings of Inbox API and enable enforcement option. I have also adjusted the copy so that it can apply to all inbox types.

Fixes: #4804
2022-07-06 21:47:39 +02:00
3145492a26 chore: Copy change for inbox management page (#4868)
Copy change for inbox management page

Co-authored-by: Hricha Shandily <103104754+Hricha-Shandily@users.noreply.github.com>
2022-07-06 21:46:23 +02:00
Sojan JoseandGitHub a6c609f43d feat: Support for Whatsapp Cloud API (#4938)
Ability to configure Whatsapp Cloud API Inboxes

fixes: #4712
2022-07-06 21:45:03 +02:00
Tejaswini ChileandGitHub 4375a7646e fix: Fixing message create issue for deleted instagram story (#4979) 2022-07-06 17:18:36 +05:30
Pranav Raj SandGitHub 2a899a633a chore: Remove confirm password field from the account signup step (#4976) 2022-07-06 12:26:26 +07:00
Tejaswini ChileandGitHub b86638faac fix: last incoming message sort (#4972) 2022-07-06 00:37:43 +05:30
Sojan JoseandGitHub ac2adfbd57 chore: Append incoming SMS to last conversation (#4906)
- Append incoming SMS to the last conversation created for a contact
2022-07-05 21:19:41 +05:30
Jordan BroughandGitHub 4b405dc052 chore: Remove no-op condition in Api::V1::InboxesHelper (#4966)
-  `smtp` cannot be nil in this context
- `anything&.nil?` will never be truthy, even if `anything` is nil
2022-07-05 17:12:53 +02:00
Sojan JoseandGitHub 5d2cdb40f5 chore: Disable CORS on public API endpoints (#4970)
fixes: #3070
2022-07-05 15:00:17 +02:00
Tejaswini ChileandGitHub 029209a634 feat: Portal and Category public APIs (#4946) 2022-07-05 17:15:38 +05:30
Tejaswini ChileandGitHub ae59d0a343 feat: CRUD operation for associated articles to current article (#4912) 2022-07-04 20:29:44 +05:30
Tejaswini ChileandGitHub 62ed9fe1b4 fix: update gemfile (#4968) 2022-07-04 12:38:45 +05:30
Tejaswini ChileandGitHub 97bf5d0c6a fix: Fetch email address to create contact (#4952)
Get the email address from the email content in the correct format.

Fixes: chatwoot/product#454
2022-07-02 17:40:28 +05:30
Tejaswini ChileandGitHub ac7ebe516a fix: Add validation for the inbox name to avoid special characters (#4920) 2022-06-30 10:59:37 +05:30
Pranav Raj SandGitHub 3f6862e04d chore: Display API key in the configuration for WhatsApp Channel (#4944) 2022-06-29 11:52:55 +05:30
Tejaswini ChileandGitHub df1bf112ea feat: Category API to handle linked categories and parent-sub categories (#4879) 2022-06-28 11:23:20 +05:30
Pranav Raj SandGitHub c0249a1b5b chore: Fix loading state in the inbox settings page (#4926) 2022-06-24 23:15:46 +05:30
Fayaz AhmedandGitHub 263b8240d3 fix: Add a fix for minor UI / a11y issues (#4905) 2022-06-24 23:12:53 +05:30
Pranav Raj SandGitHub dcbca173ac chore: Revert the migration for inbox name changes (#4919) 2022-06-23 20:36:46 +05:30
Sivin VargheseandGitHub f39c10395a fix: Add email validation in the email field of the new contact form (#4909) 2022-06-23 19:22:31 +05:30
Pranav Raj SandGitHub b7606e4dd2 feat: Add native support for CSML in agent_bot API (#4913) 2022-06-23 19:17:46 +05:30
f71980bd95 chore: Enhance contact merge action for identified users (#4886)
- Discard conflicting keys 
- Do not merge if there is already an identified contact

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-23 15:48:56 +05:30
Aswin Dev P.SandGitHub d5ddc9d76c chore: Fix SMTP sentry issue (#4883)
* Fix SMTP sentry issue
2022-06-22 14:09:04 -07:00
Vishnu NarayananandGitHub f2dd88223f feat: add chatwoot ctl(cwctl) cli tool (#4836)
* chore: Add log messages for stages skipped during installation

* feat: allow chatwoot user to start/stop/restart chatwoot service

* feat: init options support

* feat: add option support to linux install script [c|h|i|l|s|u|wi]

Install/Update/Configure/Manage your Chatwoot installation
Example: cwctl -i master
Example: cwctl -l web
Example: cwctl --logs worker
Example: cwctl --upgrade
Example: cwctl -c

Installation/Upgrade:
  -i, --install             install Chatwoot with the git branch
specified
  -u, --upgrade             upgrade Chatwoot to latest version
  -s, --ssl                 fetch and install ssl certificates using
LetsEncrypt
  -w, --webserver           install and configure Nginx webserver

Management:
  -c, --console             open ruby console
  -l, --logs                tail logs from Chatwoot. Supported values
include web/worker.

Miscellaneous:
  -h, --help                display this help text and exit

* feat: add cwctl to PATH

* feat: add -v to cwctl

* chore: switch db migration to db:chatwoot_prepare

* fix: reload systemd files after update

* fix: improve -s -w cwctl options

* chore: throw error if run without options

Signed-off-by: Vishnu Narayanan <vishnu@chatwoot.com>

* feat: add -d/--debug option to cwctl

* fix: remove hardcoded ruby version in cwctl --upgrade

* chore: improve cwctl -v function

* fix: disable cwctl selfupdate

* chore: cleanup

* feat: allow chatwoot user to run cwctl

* chore: cwctl improve formatting for log messages

* fix: variable expansion inside heredoc

* feat: save pg_pass to file to support idempotency

One of the things preventing idempotency was the postgres
password generated at run-time to setup postgres initally.

This commit saves the password to the file if postgres setup function
is executed and reloads on future re-runs if needed.

* chore: formatting

* chore: add cwctl promotion message at the end of installation

* feat: add comments

* chore: add chatwoot and cwctl version files

* feat: add func to get latest chatwoot version

* chore: formatting

* feat: add --restart option to cwctl

* chore: update --help with restart option details

* chore: minor improvements to --restart
2022-06-22 23:39:01 +05:30
Tejaswini ChileandGitHub ffd102cdfe Feat: custom sort (#4864) 2022-06-22 11:04:42 +05:30
Vishnu NarayananandGitHub a2204cf269 chore: add artifact hub shield to README (#4904)
https://artifacthub.io/packages/helm/chatwoot/chatwoot
2022-06-21 20:02:35 +05:30
Fayaz AhmedandGitHub 9c721d279e fix: Truncate overflowing labels in bulk actions selector (#4898) 2022-06-20 22:32:52 +05:30
Tejaswini ChileandGitHub 9cf6d18e4c fix: Update the documentation for automation rules API endpoint (#4896) 2022-06-20 19:57:52 +05:30
Fayaz AhmedandGitHub 3fa34991d0 fix: Display missing agent avatar in bulk actions and reports (#4893) 2022-06-20 16:04:26 +05:30
f31c6d5de2 feat: Update the design of labels to use a smooth theme (#4325)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-20 15:09:22 +05:30
Muhsin KelothandGitHub a8c6cd729b chore: Sync pre-chat fields after custom attribute update (#4692) 2022-06-20 14:16:49 +05:30
Sojan JoseandGitHub 6c6df8661b chore: Codespace webpacker fix (#4887)
- fixes the webpacker error when running overmind start -f Procfile.dev
2022-06-17 19:12:56 +05:30
Sojan JoseandGitHub db86263353 chore: Codespace Improvements (#4867)
- switch to ubuntu base image
- use rbenv to manage ruby 
- add gh to base image
2022-06-17 03:07:07 +05:30
Fayaz AhmedandGitHub 205d42e978 fix: Bulk actions agent loading (#4874) 2022-06-16 11:02:32 +05:30
Prithvi TharunandGitHub 644f07a23d chore: Copy change for automatic greeting message (#4727)
fixes: #4726
2022-06-15 18:34:24 +05:30
Sojan JoseandGitHub 881feb1274 Merge tag 'v2.6.0' into develop
v2.6.0
2022-06-15 12:09:39 +00:00
Sojan JoseandGitHub 374b367115 Merge branch 'release/2.6.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-06-15 12:09:13 +00:00
Sojan JoseandGitHub c2114e468e Bump version to 2.6.0 2022-06-15 12:06:15 +00:00
Aswin Dev P.SandGitHub 9015d83679 chore: Fix sentry issues (#4863)
Fix sentry issues.

Fixes #4815, #4814, #4811, #4809
2022-06-15 16:20:19 +05:30
067c905329 feat: Allow agents to bulk assign labels to conversations (#4854)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-15 14:18:05 +05:30
Sojan JoseandGitHub fdcaed75f6 chore: Move Whatsapp template sync to cron (#4858)
syncing WhatsApp templates job is moved to a cron job for a better user experience. The Templates are synced at 15-minute intervals now.
2022-06-14 23:46:36 +05:30
Pranav Raj SandGitHub 1bb0371c1d feat: Add agent_reply_time_window in API channels (#4857) 2022-06-14 18:05:37 +05:30
Pranav Raj SandGitHub f0db8545cb fix: Update profile settings header title (#4856) 2022-06-14 10:55:16 +05:30
Tejaswini ChileandGitHub 37cb46238a chore: Add documentation for automation rule, fix conversation/inbox_members (#4852) 2022-06-14 10:35:56 +05:30
713fdb44ee feat (ee): APIs to configure an auto assignment limit for inboxes (#4672)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-13 20:18:38 +05:30
Tejaswini ChileandGitHub ae72757d23 feat: APIs for Articles (#4777)
Fixes: #4802
2022-06-13 15:56:49 +05:30
2198930185 feat: Add snooze, reopen option to bulk actions (#4831)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-13 12:14:27 +05:30
Tejaswini ChileandGitHub aa903a5da9 Fix: backend changes for custom attribute (#4830) 2022-06-13 11:58:54 +05:30
Pranav Raj SandGitHub 98f2160462 chore: Remove partner signup link (#4843) 2022-06-13 11:27:22 +05:30
Sojan JoseandGitHub bc8e08f126 chore: Update translations from Crowdin (#4838) 2022-06-12 11:08:06 +05:30
7bb8186e43 chore: Update self-closing tag eslint config (#4826)
* chore: Fix self-closing tag issues

* Fix merge conflicts

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2022-06-10 19:29:52 +05:30
Pranav Raj SandGitHub 3f3ee6c34a chore: Add support for message_templates in API inbox (#4835) 2022-06-10 18:40:29 +05:30
Tejaswini ChileandGitHub 9bac5873ef chore: upgrade FB api version (#4834) 2022-06-10 12:26:21 +05:30
Fayaz AhmedandGitHub c5c89449dd fix: Remove validation for WhatsApp templates with no params (#4820) 2022-06-09 21:34:59 +05:30
Sojan JoseandGitHub 6385e42d9b chore: Update translations from Crowdin (#4833) 2022-06-09 21:30:03 +05:30
Sojan JoseandGitHub 74fa907010 chore: Update translations from Crowdin (#4822) 2022-06-08 21:36:47 +05:30
a9e84ec182 chore: Update translations from Crowdin (#4772)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-08 18:07:45 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5d1729c7dd chore(deps): bump jmespath from 1.6.0 to 1.6.1 (#4808)
Bumps [jmespath](https://github.com/trevorrowe/jmespath.rb) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/trevorrowe/jmespath.rb/releases)
- [Changelog](https://github.com/jmespath/jmespath.rb/blob/main/CHANGELOG.md)
- [Commits](https://github.com/trevorrowe/jmespath.rb/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: jmespath
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 10:08:27 +05:30
Jordan BroughandGitHub 635e544124 chore: Make "apk" commands consistent in Dockerfile (#4790)
* Make "apk" commands consistent in Dockerfile

1. Add "--no-cache" to some "apk" command that are missing it

* Remove "--update-cache" in Dockerfile

> As of Alpine Linux 3.3 there exists a new --no-cache option for apk. It allows
> users to install packages with an index that is updated and used on-the-fly and
> not cached locally
>
> This avoids the need to use --update-cache and remove /var/cache/apk/* when
> done installing packages.

https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md
2022-06-07 19:49:32 +05:30
Tejaswini ChileandGitHub 772d92a4d3 fix: Facebook reauthorization mailer (#4695) 2022-06-07 17:50:51 +05:30
bad24f97ab feat: Add support for Whatsapp template messages in the UI (#4711)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-07 17:33:33 +05:30
Tejaswini ChileandGitHub 56f668db6b feat: Attribute changed filter for automations (#4621) 2022-06-07 13:01:01 +05:30
Pranav Raj SandGitHub 267252d13a chore: Remove flay, rspec from development/test group (#4795) 2022-06-06 12:43:19 +05:30
79a525aa62 feat: Add Bulk actions to conversations (#4647)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-03 11:12:22 +05:30
Vishnu NarayananandGitHub 43a0b4c039 fix: command execution in heredoc comment (#4783) 2022-06-02 19:51:50 +05:30
Pranav Raj SandGitHub 6b9f4d08ca fix: Disable marking IMAP connection as invalid for Standard Errors (#4764) 2022-06-02 11:38:58 +05:30
c7c46463ae fix: Update text used in personal message signature (#4776)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-01 18:41:18 +05:30
Pranav Raj SandGitHub b9aa4444b3 feat: Allow users to create dashboard apps to give agents more context (#4761) 2022-06-01 11:13:10 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
55f7be4ffc chore(deps): bump eventsource from 1.1.0 to 1.1.1 (#4774)
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-01 10:57:18 +05:30
Fayaz AhmedandGitHub 3f382e5979 Handle falsy values for filename (#4766) 2022-05-31 16:38:24 +05:30
Sojan JoseandGitHub afc7c1ac64 chore: Update translations (#4755) 2022-05-30 18:39:20 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e924ce8b4e chore(deps): bump rack from 2.2.3 to 2.2.3.1 (#4756)
Bumps [rack](https://github.com/rack/rack) from 2.2.3 to 2.2.3.1.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.3...2.2.3.1)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 17:18:18 +05:30
568c30e93e chore: Update ruby and docker base image to 3.0.4 (#4693)
* chore: Update ruby version to 3.0.4

* chore: update ruby version in docker workflow

* chore: update ruby version to 3.1.2

* Upgrade vue-jest to remove deasync

* Revert to 3.0.4 to see if deasync issue is fixed

* fix: script failure if pg/redis not opted in

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-05-27 17:33:24 +05:30
Devin EllisandGitHub 50d2dbd462 chore: Fix the exception while destructuring data in chatwoot:error listener (#4702) 2022-05-27 12:23:29 +05:30
52fad886b8 feat: Add business hours in downloadable reports (#4674)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
2022-05-27 09:26:59 +05:30
Sojan JoseandGitHub dceeb57a1d chore: Update translations from Crowdin (#4751) 2022-05-26 20:23:36 +05:30
Sojan JoseandGitHub ab05dd9b9b chore: Improve the reauthorization requirement for Email Channel (#4753) 2022-05-26 20:23:00 +05:30
Tejaswini ChileandGitHub 47a6d9681a feat: send instagram message after 24 hours (#4698)
Added MESSAGE_TAG: HUMAN_AGENT for Instagram messages if the user wants to send it after the standard message window.

Fixes #4689
2022-05-26 19:05:30 +05:30
Pranav Raj SandGitHub 1215f37dda fix: Remove translated keys from locale files (#4748) 2022-05-25 17:06:31 +05:30
Pranav Raj SandGitHub 7434b60f71 fix: Revert changes to fix name updation from pre-chat form (#4741) 2022-05-25 12:38:23 +05:30
22d22cf4c3 feat: Improve Linux installation experience (#4713)
* feat: improve linux install script

* feat: setup logging and reduce verboseness

- redirect output/error to logfile
- reduce verboseness in main script exection
- trap non-zero exit

* chore: remove debug logging

* feat: fix exit handler

* improve legibility

* Apply suggestions from code review

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>

* chore: improve formatting

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-05-25 12:30:00 +05:30
baa3efaf0e chore: Update cache name in Circle CI builds (#4738)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-05-24 22:15:57 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d20eafbda4 chore(deps): bump nokogiri from 1.13.5 to 1.13.6 (#4734)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.5 to 1.13.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.5...v1.13.6)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 11:12:19 +05:30
Pranav Raj SandGitHub 56cd9bc0b8 chore: Add Assignable Agents API (#4722) 2022-05-23 19:24:07 +05:30
Pranav Raj SandGitHub 79280ae372 chore: Enable Ukrainian language (uk) (#4720) 2022-05-23 12:46:17 +05:30
Sojan JoseandGitHub f74a1f7d5a chore: Update translations (#4691) 2022-05-23 11:33:54 +05:30
Aswin Dev P.SandGitHub 59969cc553 chore: Update conversations API to include unattended conversations. (#4708)
* Update conversations API to include unattended conversations.
2022-05-22 00:38:41 -07:00
Pranav Raj SandGitHub 11ea8a3032 chore: Update the documentation for configuring webhooks in the account (#4703) 2022-05-19 21:43:23 +05:30
Aswin Dev P.SandGitHub 8538660bbd Add first_reply_created event in conversation (#4576) 2022-05-18 21:16:33 -07:00
Pranav Raj SandGitHub 20565d09c0 fix: Update report method to fix issues with special characters (#4697) 2022-05-18 12:15:30 +05:30
Pranav Raj SandGitHub 47f04ee3fe chore: Add an option to download CSAT Reports (#4694) 2022-05-17 21:01:45 +05:30
Sojan 361ffbab82 Merge branch 'release/2.5.0' into develop 2022-05-16 16:55:34 +05:30
Sojan 63b1013b45 Merge branch 'release/2.5.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-05-16 16:55:24 +05:30
Pranav Raj SandGitHub b8f25d77bf chore: Enable New Message Button on Contact Panel (#4681)
Fixes: #4653
2022-05-16 16:41:40 +05:30
Tejaswini ChileandGitHub 938fb887c4 feat: Portal endpoint (#4633) 2022-05-16 13:59:59 +05:30
Sojan JoseandGitHub f620bdec54 chore: Update translations (#4682) 2022-05-16 12:45:45 +05:30
Pranav Raj SandGitHub 45e2cd4903 fix: Render links with target attribute (#4685) 2022-05-16 11:29:05 +05:30
Sojan 2060f270d3 Bump version to 2.5.0 2022-05-13 17:26:26 +05:30
Sojan JoseandGitHub 6535624cd6 chore: Update translations from Crowdin (#4665) 2022-05-13 11:38:49 +05:30
Vishnu NarayananandGitHub 8fbe470bdd feat: Control sidekiq log level via rails LOG_LEVEL env variable (#4675) 2022-05-13 11:34:43 +05:30
Hricha ShandilyandGitHub ab3ee74a86 chore: Update the note of Personal message signature (#4679) 2022-05-13 11:34:09 +05:30
Aswin Dev P.SandGitHub 41b8901432 Fix: Agent Reports counts when they have access to multiple accounts (#4663)
This change restricts the agent report API to fetch agent metrics from the current account.

Fixes: #4660
2022-05-11 14:31:57 +05:30
Tejaswini ChileandGitHub 329d305e92 Fix: Creating contacts for already outgoing/echo messages (#4668)
Check if the Instagram contact is already present in the system before throwing the exception.

Fixes: #4666
2022-05-11 14:29:38 +05:30
Sojan JoseandGitHub 5c161e0fef chore: Split Inbox Settings Page Component (#4664)
Clean up the Inbox settings page component as the logic was growing complex.

- Moved subpages like collaborators and configuration to new components
- Moved Assignment settings to the collaborators tab
- Introduced a new inbox seeder to quickly preview setting pages of all inbox types when in development
2022-05-11 13:33:24 +05:30
Pranav Raj SandGitHub 9cec091716 chore: Remove unused method scriptGenerator (#4671) 2022-05-11 12:05:42 +05:30
Tejaswini ChileandGitHub 9ed1f5d96b Fix: Make version changeable from the environment vars (#4654) 2022-05-10 19:20:55 +05:30
Sojan JoseandGitHub 81d0405473 chore: Ability to update user email via Platform APIs (#4659)
When the platform update API is called with a new user email, Chatwoot will still follow the same behaviour as in the dashboard where the user will have to confirm the new email activation link until the email gets updated on the user record.

In the case of platform APIs, this might not be the ideal behaviour since the original app will already have a flow to update the user emails. Hence we need to confirm the emails without the extra step in this case

fixes: #4510
2022-05-10 00:28:46 +05:30
Tejaswini ChileandGitHub f64cf85ab2 Fix: sentry issue for slack incoming files check (#4656)
Interpreter error for nil. any? added nil. present?

Fixes: https://sentry.io/share/issue/48c10d26490f4bdaab78c82244fcea98/
2022-05-09 23:54:45 +05:30
Tejaswini ChileandGitHub 0eeab8c56c Fix: slack repeated callback event message for attached files (#4610) 2022-05-09 19:18:30 +05:30
Sojan JoseandGitHub 5ce29a7beb chore: Update translations from Crowdin (#4652) 2022-05-09 18:57:05 +05:30
Sojan JoseandGitHub 04dfb034cc chore: Upgrade Exception tracking (#4638)
- Upgrade Sentry Libraries
- Enable provision for account and user info in error tracking
- Add ChatwootExceptionTracker

fixes: #4375
2022-05-09 14:23:19 +05:30
Aswin Dev P.SandGitHub 360b438a55 Fix: Campaign triggers first_response reporting event (#4607)
* Fix: Campaign triggers first_response reporting event

* fix spec failure
2022-05-09 01:34:52 -07:00
5b5a6d89c0 chore: "Channel::TwilioSms" to be unique on account_sid+phone_number (#4188)
"Twilio::IncomingMessageService" searches for the correct "Channel::TwilioSms"
by account_sid+phone_number.  If these values are duplicated then which record it
finds is indeterminate and may alternate between queries.

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-05-07 17:57:16 +05:30
Pranav Raj SandGitHub 2e0d43c093 chore: Use different files for widget and dashboard audio alert (#4637) 2022-05-06 20:19:36 +05:30
ef850eda0f feat: Add the SDK method to programatically toggle live chat bubble (#4223)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-05-06 19:30:48 +05:30
Sojan JoseandGitHub 80b8f5f915 chore: Update puma config as per recommendations (#3640)
Ability to configure workers for puma

ref:
https://devcenter.heroku.com/articles/concurrency-and-database-connections#threaded-servers
https://www.speedshop.co/2017/10/12/appserver.html
2022-05-06 16:38:44 +05:30
77a6893203 feat: Open "Switch Account" modal when clicking account name on dashboard (#4613)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-05-06 14:55:38 +05:30
Sojan JoseandGitHub 8d2b719dc1 chore: Sentry issues (#4623)
Fixes various issues reported on sentry

- Twilio channel creation validation errors
- Room Channel error with nil class
- Webhook Uri exception
2022-05-06 14:50:55 +05:30
Muhsin KelothandGitHub 4f9d41962a fix: Pre chat custom fields drag and drop (#4530) 2022-05-06 12:01:34 +05:30
Vishnu NarayananandGitHub 66d366f0ff chore: update newrelic gem to support log forwarding (#4626)
Newrelic gem 8.7 has application log forwarding support and
this is enabled by default. Update the gem to make use of this
feature. Chatwoot have turned this off by default though.

Set `NEW_RELIC_APPLICATION_LOGGING_ENABLED` to enable this feature. Make
sure to disable another log forwarding services you have to prevent
duplicated logs.

ref: https://docs.newrelic.com/docs/release-notes/agent-release-notes/ruby-release-notes/ruby-agent-870
Fixes: #4625
2022-05-05 23:57:55 +05:30
Pranav Raj SandGitHub 832a0f24a0 chore: Update missing packages in yarn.lock (#4627) 2022-05-05 19:29:51 +05:30
Sojan JoseandGitHub c9a8796a36 chore: Sentry Issue fixes (#4618)
Address the following sentry issues

fixes: #4616, #4617
2022-05-05 00:31:11 +05:30
giquieuandGitHub b3c8c83830 fix: unable to send audio messages on Telegram (#4493)
- Changed the lib used to record the audio (videojs-record). 
- Changed the audio recording format to .ogg, this will keep compatibility with sending to channels, Telegram, Whatsapp, Web Widget and API.
- Changed the visualization of recording waves, it is now using bars, the same format used by applications (Whatsapp and Telegram)


Fixes: #4115
2022-05-02 13:14:04 +05:30
Shivam ChaharandGitHub c1cc94e37c Fix: Accept phone number in public contact api (#4580)
This PR makes it possible to pass a phone number to the public contacts API.

Fixes #4023
2022-04-29 20:54:12 +05:30
Vishnu NarayananandGitHub 45099f40f1 fix: ce spec action for PRs from forks (#4587)
CE spec action was failing for PRs from external forks at the checkout stage. This PR modifies the checkout action to use the full repo name and branch.

#4586
2022-04-29 14:38:10 +05:30
Shivam ChaharandGitHub b5e0921d0d fix: sidekiq cron deprecation warnings (#4581)
Updates sidekiq-cron to fix the deprecation warnings

Fixes #4090
2022-04-29 00:43:10 +05:30
Tejaswini ChileandGitHub e5136c2691 Fix: File upload from slack (#4494)
When you upload a file from slack chat it's not appearing in the chatwoot inbox.
This is because Slack updated the webhook event format
2022-04-28 21:09:39 +05:30
Shivam ChaharandGitHub 04194e7247 Fix: attachment name for incoming messages
Use original_filename to get the name of the file attached to the message.

Had to add the message_type method to the WhatsApp/incoming_message_service due to the Assignment Branch Condition linter error for the attach_files method.

Fixes #4183
2022-04-28 21:02:17 +05:30
Aswin Dev P.SandGitHub 8d04894744 fix: Add index in conversation and reporting event (#4577)
Fixes chatwoot/product#422
2022-04-28 16:58:06 +05:30
Tejaswini ChileandGitHub cb38ec3267 chore: Allow Facebook channel to receive standby messages (#4511) 2022-04-28 01:14:03 +05:30
Pranav Raj SandGitHub 8348392d43 fix: Disable automation on tweets (#4571)
Fixes #4565
2022-04-27 20:10:40 +05:30
Aswin Dev P.SandGitHub 95c7a24dd1 fix: Unattendeed conversation count in agent metrics (#4568) 2022-04-27 06:26:35 -07:00
Pranav Raj SandGitHub 4250c40d1d chore: Upgrade rails to 6.1.5.1 (#4570) 2022-04-27 18:33:22 +05:30
3d824855f0 Fix positioning of read ticks on attachment message bubbles (#4545)
* Fix positioning of read ticks

* Review fixes

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2022-04-27 08:12:30 +05:30
Aswin Dev P.SandGitHub 1bf2da180b fix: Update agent metrics query to show data from current account (#4557)
* Update agent metrics query to fetch data from current account
2022-04-26 05:52:13 -07:00
Muhsin KelothandGitHub 3a5e34fccb fix: Check phone_number and email changes are exist before validation (#4551) 2022-04-26 15:13:28 +05:30
Sivin VargheseandGitHub fa031a0e2d feat: Adds support for canned responses in contact messages (#4453) 2022-04-26 09:04:34 +05:30
Aswin Dev P.SandGitHub 676796ddc7 feat: Add reports about live agent load (#4537)
* feat: Add reports about live agent load
2022-04-25 07:34:41 -07:00
899176a793 feat: Add event subscription option to webhooks (#4540)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-04-25 17:44:42 +05:30
Muhsin KelothandGitHub fa51fd1d73 fix: Bypass invalid values in contact patch end point (#4519) 2022-04-25 12:25:38 +05:30
1b3011b27b fix: Add Attachment endpoint to save file against automation rule (#4480)
Co-authored-by: fayazara <fayazara@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-24 12:02:40 +05:30
2acb48bbe0 feat: Add support for conversation attribute automation conditions in message event (#4518)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-21 20:52:23 +05:30
Muhsin KelothandGitHub b082b0e58c fix: Dig params in widget contact end point (#4516) 2022-04-21 20:39:45 +05:30
Sojan bd0ed322cc Merge branch 'hotfix/2.4.1' into develop 2022-04-21 14:19:18 +05:30
Sojan 3584bbb3af Merge branch 'hotfix/2.4.1'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-04-21 14:19:09 +05:30
Pranav Raj SandGitHub f769471439 fix: Issue with closed all hours (#4521)
fixing the accidentally merged conditions for open all day and closed all day.
2022-04-21 14:14:56 +05:30
Sojan f2815a2c00 Bump version to 2.4.1 2022-04-21 14:10:54 +05:30
Muhsin KelothandGitHub 27ddd77a1b chore: Sanitize html content (#4498) 2022-04-21 11:27:28 +05:30
Sojan JoseandGitHub 2c73df4292 Chore: Provide fixed attachment URLs for Channels (#4507)
Prior to this change, The attachment URL sent from Chatwoot to 3rd party integrations like Whatsapp and Facebook
involved a 301 redirect before the original content is served. This causes intermittent breakages for the sent attachments.

fixes: #3632
ref: https://blog.saeloun.com/2021/09/14/rails-7-adds-expiring-urls-to-active-storage.html
2022-04-20 22:42:13 +05:30
2b2252b66e feat: Add a read indicator for web-widget channel (#4224)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-20 16:03:12 +05:30
Pranav Raj SandGitHub f2f0d466f2 chore: Update Help Center APIs to accomodate locale (#4515) 2022-04-20 16:00:37 +05:30
Muhsin KelothandGitHub 4f3a271355 chore: Add custom attributes in campaign.triggered event (#4463) 2022-04-20 10:49:52 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5b9c4bf7f1 chore(deps): bump async from 2.6.3 to 2.6.4 (#4497)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 17:13:17 +05:30
Muhsin KelothandGitHub 26f23a6e21 feat: Custom fields in pre-chat form (#4189) 2022-04-19 12:47:29 +05:30
Tejaswini ChileandGitHub 1ccd29140d Feat: send fb message outside of standard messaging window (#4439) 2022-04-19 12:21:20 +05:30
Sojan d2d838afd1 Merge branch 'release/2.4.0' into develop 2022-04-18 23:25:59 +05:30
Sojan 480eb3043c Merge branch 'release/2.4.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-04-18 23:25:37 +05:30
Sojan 569ae24d8a Bump version to 2.4.0 2022-04-18 23:23:17 +05:30
Sojan JoseandGitHub 615a575bdd fix: Agent typing indicator for website widget (#4495)
When we migrated the pubsub tokens from contact to contact inboxes, we missed out on doing this update for the typing indicator events. Hence the agent typing events weren't visible on the widget side. This change fixes that and removes the necessary column contact pubsub token from the model.

fixes: #4476
2022-04-18 19:05:45 +05:30
Pranav Raj SandGitHub 17fb6b8d55 fix: Update business hour calculation (#4496) 2022-04-18 18:15:20 +05:30
Muhsin KelothandGitHub e010f0c6f0 chore: Sync pre-chat fields after custom attribute destroy (#4456) 2022-04-18 14:06:27 +05:30
Shivam ChaharandGitHub 04e890070d fix: Change report_type to type in report API docs (#4492) 2022-04-18 11:38:22 +05:30
Pranav Raj SandGitHub 0319b78eac fix: Allow users to login even if they have access to more than 15 accounts (#4475) 2022-04-14 20:54:26 +05:30
Vishnu NarayananandGitHub 80e5d6d7a0 feat: add chatwoot_edition variable for CE docker images (#4462)
* chore: add chatwoot_edition variable for CE docker images

* fix cw_edition variable

* chore: update comment

* feat: include cw_edition data in payload to hub

* refactor cw_edition to edition
2022-04-14 17:15:57 +05:30
337a74a10c feat: Add send message, fix issues with message conditions (#4423)
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
2022-04-14 13:36:55 +05:30
d4be268cc3 enhancement: Remove clickaway for expanded reply box (#4414)
* enhancement: Remove clickaway for expanded reply box

* Removes unused imports

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-04-13 12:04:34 +05:30
Tejaswini ChileandGitHub a6b119d187 Feat: twitter image support (#4429) 2022-04-13 01:29:51 +05:30
Tejaswini ChileandGitHub 923b4637db chore: Automation bug fix (#4442) 2022-04-12 20:23:34 +05:30
b6ad468eb4 fix: Nokogiri bundle update (#4448)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-04-12 11:30:54 +05:30
14503b5fe0 feat: Add missing password validation at signup (#4441)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-12 11:08:12 +05:30
c64e2e3bc5 chore: Report improvements (#4392)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-11 20:57:22 +05:30
Aswin Dev P.SandGitHub 31cdc63e18 fix: Remove IMAP and SMTP email validation (#4435)
* Remove IMAP and SMTP email validation
* Rename imap_email & smtp_email columns to imap_login & smtp_login respectively.
* Use channel email domain if inbound email domain not present
2022-04-11 07:07:20 -07:00
Nithin David ThomasandGitHub 3d164271a8 fix: Yellow color shades are inconsistent (#4391) 2022-04-11 17:27:28 +05:30
Sojan JoseandGitHub 1194188f13 chore: Swagger doc for Conversation meta API (#4394)
fixes: https://github.com/chatwoot/chatwoot/issues/4327
2022-04-11 16:43:09 +05:30
Aswin Dev P.SandGitHub 9b5eb98c59 feat: Support additional authentication mechanisms for SMTP (#4431)
* Support additional authentication mechanisms for SMTP
2022-04-11 03:13:05 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8622740161 chore(deps): bump moment from 2.29.1 to 2.29.2 (#4434)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 15:10:37 +05:30
Muhsin KelothandGitHub fb3ed29c90 chore: Add missing test cases in conversations_controller_spec (#4438) 2022-04-11 14:06:44 +05:30
Aswin Dev P.SandGitHub f1ae09d21b fix: SMTP shouldn't be configurable without IMAP enabled (#4428)
* fix: Configure SMTP only if IMAP is enabled
2022-04-11 00:05:03 -07:00
Pranav Raj SandGitHub b1efcde495 feat: Remove duplicate Switch Component (#4427) 2022-04-08 18:25:08 +05:30
Pranav Raj SandGitHub bc7bcc20b8 Revert "feat: Adds support for draft in conversation reply box (#4205)" (#4425)
This reverts commit 5ea0436051.
2022-04-08 15:52:39 +05:30
Muhsin KelothandGitHub 7e5ec7925c feat: Add phone_number & custom_attributes in create conversation end point (#4421) 2022-04-08 14:53:37 +05:30
727993aa19 feat: Add toggle button component(#4419)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-04-08 14:02:26 +05:30
Aswin Dev P.SandGitHub d5536d65f7 feat: Consider business hours while generating the reports (#4330)
* feat: Consider business hours while generating the reports
2022-04-08 00:18:18 -07:00
Tejaswini ChileandGitHub 57359be37e Fix: Find mailbox with cc email (#4372) 2022-04-08 11:20:19 +05:30
Sivin VargheseandGitHub 14e6a5d6b0 fix: Background dark mode colour issue in campaign view (#4416) 2022-04-08 10:54:51 +05:30
5ea0436051 feat: Adds support for draft in conversation reply box (#4205)
* Add draft support

* Fixes issue with draft loading

* Adds draft for private notes

* Use localstorage helper

* .remove instead of .clear

* Remove timestamp

* clearLocalStorageOnLogout

* Fix draft save on refresh

* Remove usage of delete operator

* Adds autosave for draft messages

* Remove setinterval and add debounce

* Removes draft redundancy check

* Adds test cases for debouncer

* Update app/javascript/shared/helpers/specs/TimeHelpers.spec.js

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>

* Update app/javascript/shared/helpers/specs/TimeHelpers.spec.js

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>

* Review fixes

* Fixes issue with debouncer

* FIxes debouncer issue

* Fixes issue with draft empty message

* Removes empty keys from local storage drafts

* Fixes error with empty draft

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2022-04-07 22:16:45 +05:30
Muhsin KelothandGitHub dfb56f6bb8 doc: Swagger for custom attribute APIs (#4382) 2022-04-07 19:01:31 +05:30
d4a046a21e fix: Audio notification would not work without action on the dashboard (#4303)
* fixes: Audio notification would not work without an action on dashboard

* fixes spec

* Minor fixes

* Minor fixes

* Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-04-07 10:23:18 +05:30
Fayaz AhmedandGitHub 8482ecc1b1 Feat - Sort inboxes alphabetically (#4383) 2022-04-07 10:01:08 +05:30
Sivin VargheseandGitHub 5b490bc8cc chore: fix scroll bar color in the dark mode (#4404) 2022-04-07 07:14:40 +05:30
Muhsin KelothandGitHub c2afdd5c93 chore: Remove unnecessary fields from notification payload (#4403) 2022-04-07 00:07:53 +05:30
Vishnu NarayananandGitHub 75ce5345a9 feat: add gh action to build Chatwoot CE/foss docker image (#4406)
Github action to build and push chatwoot-ce(foss) edition images. This action will run on merges to master, develop and when tags are created. Corresponding docker tags are as follows.

GitHub branch/tag  -->	docker tag
----
master 	--> latest-ce
develop 	---> develop-ce
v2.3.2 	---> v2.3.2-ce
v* 	---> v*-ce

Fixes #4388
2022-04-06 21:14:04 +05:30
9329f08e14 chore: Fix typo in en localisation file (#4405)
Fix

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2022-04-06 20:21:19 +05:30
Pranav Raj SandGitHub 0b03e4b296 feat: Add an option to disable endConversation button (#4352) 2022-04-06 13:54:55 +05:30
Tejaswini ChileandGitHub 821b953ee9 Fix: handling UTF encoded mail (#4384) 2022-04-06 12:36:32 +05:30
Sojan JoseandGitHub 7a8aa4ca2e chore: Add Swagger Doc for Team Members (#4390)
Add swagger documentation for Team Members APIs
2022-04-05 16:05:49 +05:30
2595e774e5 fix: Update validations in automation edit actions (#4370)
Co-authored-by: fayazara <fayazara@gmail.com>
2022-04-05 15:22:56 +05:30
Sojan JoseandGitHub 9a8a0bd865 feat: Ability to customize the online presence duration (#4385) 2022-04-05 15:20:34 +05:30
cd5646b4b9 fix: Skip contact_last_seen_at in empty conversation payload (#4387)
* Fix undefined `last_seen_at` empty conversation

* chore: remove the comment

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-04-05 14:00:07 +05:30
Vishnu NarayananandGitHub 76f53d9a11 feat: add gh action to run CE edition tests (#4342)
* feat: add gh action to run CE spec

* setup ruby
* add pg,redis services
* fix failing tests
2022-04-04 19:27:01 +05:30
Muhsin KelothandGitHub 591d186d66 chore: Add agent_last_seen_at in conversation API (#4377) 2022-04-04 18:23:38 +05:30
Jordan BroughandGitHub 73d8073530 chore: Fix test failure in action_cable_listener_spec.rb due to ordering (#4357) 2022-04-04 15:15:45 +05:30
Muhsin KelothandGitHub 1dd0c7249c fix: Unread notification count in multiple accounts (#4373)
Fixes: #4367
2022-04-04 14:34:01 +05:30
Pranav Raj SandGitHub 3509692055 chore: Fix brand name in survey translations (#4360) 2022-04-03 19:22:56 +05:30
Sivin VargheseandGitHub 5d85a21287 fix: Fix login button is missing in Safari (#4332)
Fixes #4328
2022-04-01 21:03:53 +05:30
caee9535f1 feat: Support Dark mode for the widget (#4137)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-01 20:59:03 +05:30
Vishnu NarayananandGitHub 3813b3b372 feat: make linux script installation non-interactive (#4355)
This PR changes the LetsEncrypt behaviour to be non-interactive. Earlier, the installation flow was waiting for user input at the SSL cert generation stage. With this change, once the user confirms completes the initial selection, the installation can be completed unattended.
2022-04-01 00:34:50 +05:30
Pranav Raj SandGitHub c397fe1964 fix: Update the URL for POST inbox_members (#4354) 2022-03-31 21:21:25 +05:30
cb23ff53bf fix: Reset Captcha if account signup is an error (#4279)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-31 21:20:37 +05:30
Sivin VargheseandGitHub 3cd1616df6 fix: Fix agent name in Twitter channel private note acting as a link (#4326) 2022-03-31 20:22:52 +05:30
Muhsin KelothandGitHub eff3a50316 fix: Disable showing read messages in unread view (#4324) 2022-03-31 17:35:39 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0477123f92 chore(deps): bump minimist from 1.2.5 to 1.2.6 (#4351)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 16:33:14 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c9f821cc5b chore(deps): bump puma from 5.6.2 to 5.6.4 (#4348)
Bumps [puma](https://github.com/puma/puma) from 5.6.2 to 5.6.4.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.6.2...v5.6.4)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 16:02:53 +05:30
baf697f064 design: Changes yellow color palette for better contrast ratio (#4334)
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2022-03-30 18:53:24 +05:30
Tejaswini ChileandGitHub 5be9380547 Fix: html mail fix with html_body content (#4011) 2022-03-30 18:04:30 +05:30
Muhsin KelothandGitHub 24b20c10ce fix: Referer URL validation (#4309)
Fixes #354
2022-03-30 14:36:22 +05:30
Tejaswini ChileandGitHub bfe6324d9a chore: Webhook event data improvements (#4317) 2022-03-30 11:37:36 +05:30
Tejaswini ChileandGitHub 15fd37b124 Feat: attachments automation (#4266) 2022-03-30 08:08:58 +05:30
3f2ac2042f fix: Fetch conversation attributes after contact reset (#4319)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-03-29 19:51:51 +05:30
Tejaswini ChileandGitHub 3158966241 Feat: automation rule based on contact conditions (#4230) 2022-03-29 17:29:34 +05:30
Fayaz AhmedandGitHub c674393c02 feat: New automation actions (#4033) 2022-03-29 13:27:16 +05:30
Kyle KillionandGitHub cffc984ef6 chore: Add active_storage_purge queue to Sidekiq (#4322)
I found that these jobs were just enqueuing without processing until I added this queue after switching to S3 storage. This fixed that issue.
2022-03-29 11:43:07 +05:30
Aswin Dev P.SandGitHub 5e8fd689c9 feat: Add live agent load report api (#4297)
This change allows the admin user to fetch conversation metrics for an account, agents, and filter conversation metrics for a specific agent.

Fixes #4305
2022-03-29 10:31:52 +05:30
Muhsin KelothandGitHub ccf52a620b feat: Update notifications and unread count in real time (#4261) 2022-03-28 20:01:23 +05:30
Vishnu NarayananandGitHub ec0ea0b1dc chore: Upgrade to next gen docker convenience image (#4310)
* chore: Upgrade to next gen docker convenience image

https://discuss.circleci.com/t/legacy-convenience-image-deprecation/41034/16

* switch to postgres:14.1 and redis:6.2 images
2022-03-28 18:15:38 +05:30
Vishnu NarayananandGitHub 8155024b6a feat: fix logging levels (#4314)
https://ruby-doc.org/stdlib-2.7.0/libdoc/logger/rdoc/Logger.html

Fixes https://github.com/chatwoot/chatwoot/issues/4313
2022-03-28 18:14:30 +05:30
823c0ab6a7 chore: Use Round Robin service for team assignment (#4237)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-28 14:38:07 +05:30
e8bc30e3c6 feat: Add a confirmation note before deleting a note about a contact (#4294)
Co-authored-by: Richardo <richardokusuma.sali@medirecords.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-28 14:19:12 +05:30
Fayaz AhmedandGitHub 30ac8054ba feat: Add an SDK method for opening conversation in popout window (#4232) 2022-03-28 13:31:51 +05:30
Aswin Dev P.SandGitHub 0ba6e772a4 feat: Display how many conversations are considered for the metric calculation (#4273)
* feat: Display how many conversations are considered for the metric calculation
2022-03-28 00:38:23 -07:00
Aswin Dev P.SandGitHub ba0188aefc fix: Report spec failure (#4304) 2022-03-28 12:31:09 +05:30
Sojan JoseandGitHub e0f29b9d81 chore: Add swagger docs for Canned Responses (#4295)
fixes: #3962
2022-03-26 00:43:44 +05:30
Pranav Raj SandGitHub 971755b845 fix: Remove unnecessary dispatchWindowEvent (#4288) 2022-03-25 20:25:07 +05:30
0667d9f016 fix: Avatars get cropped on the widget (#4238)
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-03-25 19:20:53 +05:30
Sivin VargheseandGitHub 48389d69d8 feat: New notification panel for unread notifications (#4061)
Fixes: #4052
2022-03-25 19:02:45 +05:30
Sojan JoseandGitHub ff881fcad9 chore: Support Email should give priority to environment variable (#4270)
Account.support_email should give priority to environment variables over installation config

Fixes: #3304
2022-03-25 16:13:45 +05:30
SagarandGitHub 5da0b0667f Fix: SMTP IMAP configuration from email
This fix should allow emails from the "Email" inbox to show from as "Name <email@example.com>". if SMTP within Inbox is disabled.
2022-03-25 16:05:26 +05:30
Jordan BroughandGitHub a8cfcbc168 chore: Timezone fixes for ReportBuilder and for ReportController spec (#4246)
- ReportBuilder wasn't using the specified time zone for the timestamp in the
"build" method
- The ReportController spec was calling `Time.zone.today.to_time`, but
`Date#to_time` disregards the zone from `Time.zone` and reverts to the system
time zone.
2022-03-25 14:00:27 +05:30
6bfe0f2fc1 feat: Add support for rich editor and allow CCs in email for a new conversation. (#4194)
* feat: Add support for rich editor and allow CCs in email for a new conversation.

* Minor fixes

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-03-25 11:27:45 +05:30
Jordan BroughandGitHub 131c0a8668 chore: Don't send confirmation email when creating User via platform api (#4272)
The platform api automatically confirms users so we don't need to send this
email.
2022-03-25 00:36:59 +05:30
Sojan JoseandGitHub 8e153d6350 fix: Redis 6 on Heroku breaks ActionCable config (#4269)
Heroku made some SSL/TLS changes with Redis 6, which is breaking the ActionCable configuration.
Hence providing an environment variable configuration `REDIS_OPENSSL_VERIFY_MODE` to fix that.

set the value `none` for this environment variable in your Heroku installations where breakage occurs.

fixes: #2420
2022-03-24 19:25:07 +05:30
Tejaswini ChileandGitHub 60a0709de6 Fix: added validation for custom and additional attribute (#4260) 2022-03-24 15:38:28 +05:30
Jordan BroughandGitHub 14c53b8b54 chore: Use "contain_exactly" in some tests (#4243) 2022-03-24 13:50:04 +05:30
Vishnu NarayananandGitHub 7577c9c888 fix: drop conv and campaign seq on account delete (#4256)
Conversation and campaign sequences persist in the database even after the related account is deleted. This PR adds an after_desttory callback on the account model that will delete the associated sequences.

Fixes: #4252
2022-03-24 13:33:15 +05:30
Jordan BroughandGitHub 0cf970dafd chore: Eliminate deprecation warning in "app_config_controller_spec.rb" (#4258)
Fix the warning:

Using `should` from rspec-expectations' old `:should` syntax without
explicitly enabling the syntax is deprecated. Use the new `:expect` syntax
or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead.
2022-03-24 13:31:19 +05:30
Jordan BroughandGitHub c2647a1f27 chore: Use "destroy!" instead of "destroy" when not checking the return value (#4259) 2022-03-24 13:28:25 +05:30
giquieuandGitHub 8b9aea231c feat: support audio player on widget (#4250) 2022-03-24 12:44:34 +05:30
Jordan BroughandGitHub b735135431 chore: Fix "action_mailer.delivery_method" in the test env (#4257)
Fixes: #4247
2022-03-23 20:46:28 +05:30
Sojan 160e8a8ab4 Merge branch 'release/2.3.2' into develop 2022-03-23 19:06:52 +05:30
Sojan 2605f24539 Merge branch 'release/2.3.2' 2022-03-23 19:06:45 +05:30
Sojan dd76dd4204 Bump version to 2.3.2 2022-03-23 19:05:34 +05:30
86b4183bde fix: Add multiple file paste support and fix for bugs (#4066)
- Add multiple files paste support.
- Fixes showing file name in the editor field when we paste the file from finder.
- Fixes showing the image in the advance editor when we paste the image as an attachment from the clipboard.

Fixes: #4036

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2022-03-23 18:25:57 +05:30
Jordan BroughandGitHub 4a21633a2b chore: Use bang version of "find_or_create_by!" in Platform UsersController (#4248) 2022-03-23 16:09:10 +05:30
Sojan JoseandGitHub f8c46341f6 chore: Disable invalid contact resolved activity messages (#4253)
Fixes the bug which triggered "Contact resolved conversation" activity messages when snoozed conversations where reopened
2022-03-23 16:08:42 +05:30
Pranav Raj SandGitHub 771cb5b9fc fix: Update scroll event name to fix auto-scroll (#4251)
Fixes #3622
2022-03-23 13:27:50 +05:30
Sojan JoseandGitHub f43018e017 chore: New translations automation.json (Italian) (#4231) 2022-03-22 12:42:10 +05:30
Sojan JoseandGitHub 467f3b9191 chore: Disable fetching new emails after mailbox error (#4176)
- Disabled email fetch job if credentials for the channel isn't working
- notify customers when the email channel isn't working

fixes: https://github.com/chatwoot/chatwoot/issues/4174
2022-03-22 12:14:17 +05:30
Muhsin KelothandGitHub 715400f7ab fix: Disable pre-chat fields for identified users (#4234) 2022-03-22 01:28:22 +05:30
Tejaswini ChileandGitHub 7b4cac746a feat: enhancement to un-send instagram message (#4120) 2022-03-21 17:10:15 +05:30
Sojan JoseandGitHub 6169d172d8 chore: Update translations from Crowdin (#4217) 2022-03-21 13:15:33 +05:30
Tejaswini ChileandGitHub e06a6a7c55 Automation enhancement (#4087) 2022-03-21 13:12:27 +05:30
c608ca37e0 fix: Contact conversations are showing in the chat list (#4078)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-21 11:46:43 +05:30
Pranav Raj SandGitHub 6097f4c122 fix: Update survey locale based on the account (#4207) 2022-03-20 13:07:36 +05:30
Fayaz AhmedandGitHub 8372ae418e System default monospace fonts for code elem (#4222) 2022-03-19 20:56:29 +05:30
Sojan JoseandGitHub 71391d982b chore: filter .xml files for Bandwidth SMS (#4206)
MMS sent from an ATT or Verizon phone number seems to be appending a SMIL file in .xml format for MMS.
2022-03-18 19:00:36 +05:30
b77fad52fb fix: Add missing contact information to fix invalid activity messages (#4195)
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
2022-03-18 13:43:02 +05:30
Sojan JoseandGitHub 40f31cb0a3 chore: Update translations (#4208) 2022-03-18 11:24:22 +05:30
7f8a199b29 chore: Update translations (#4099)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-17 20:02:32 +05:30
Muhsin KelothandGitHub 23fe8847d8 feat: Notification action cable event (#4154) 2022-03-17 18:56:36 +05:30
Sojan 430547e026 Merge branch 'hotfix/2.3.1' into develop 2022-03-17 16:55:00 +05:30
Sojan d0702363f4 Merge branch 'hotfix/2.3.1' 2022-03-17 16:54:49 +05:30
Sojan d6d0c79618 Bump version to 2.3.1 2022-03-17 16:53:36 +05:30
Sojan JoseandGitHub 9f8e442333 chore: Improve n+1 queries (#4202)
Fixes the n+1 queries that get triggered while accessing agents endpoint
2022-03-17 15:57:32 +05:30
Pranav Raj SandGitHub 4a3ddad02f fix: Reduce the height of the unread container while campaign is active (#4185) 2022-03-16 14:45:57 +05:30
Tejaswini ChileandGitHub 207a03155e Feat: authenticate direct upload (#4160) 2022-03-16 13:54:18 +05:30
Sojan 796a7805db Merge branch 'release/2.3.0' into develop 2022-03-15 23:04:09 +05:30
Sojan a50ea9c88a Merge branch 'release/2.3.0' 2022-03-15 23:03:59 +05:30
Sojan 711251560b Bump version to 2.3.0 2022-03-15 22:59:54 +05:30
c4837cd7ac feat: End conversation from widget (#3660)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-15 22:07:30 +05:30
Pranav Raj SandGitHub 4b748e2c8c fix: Delete content_attributes in message destroy API (#4184) 2022-03-15 22:01:16 +05:30
8c8c5a77c8 feat: Show banner message if Chatwoot update available (#3999)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2022-03-15 21:09:14 +05:30
Sojan JoseandGitHub 02dd5ecfab chore: 360Dialog attachments fix (#4173)
fixes: #3701
2022-03-15 17:42:21 +05:30
Muhsin KelothandGitHub f405572e5c Revert "feat: Custom fields in pre-chat form (#4135)" (#4182)
This reverts commit e730804b48.
2022-03-15 16:54:33 +05:30
Sojan JoseandGitHub 25876993ff fix: NoMethodError: undefined method `id' for nil:NilClass (#4172)
fixes: #4171
2022-03-15 14:30:33 +05:30
b3ba8b9513 fix: Could not able to create label (#4161)
* fixes: Could not able to create label

* review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-03-14 20:43:56 +05:30
Fayaz AhmedandGitHub 4a2452173e feat: Added support for Created At, Last Activity At filters in the UI (#4031) 2022-03-14 20:24:53 +05:30
Aswin Dev P.SandGitHub c62d74a01d feat: Display trends in report metrics (#4144) 2022-03-14 18:15:27 +05:30
Sivin VargheseandGitHub 5edf0f2bbe fix: Fix modal responsiveness (#4149) 2022-03-14 18:14:16 +05:30
Fayaz AhmedandGitHub dd1fe4f93a fix: Handle unsanitized markup in DOM (#4110) 2022-03-14 18:13:21 +05:30
Muhsin KelothandGitHub e730804b48 feat: Custom fields in pre-chat form (#4135)
Fixes: #2744
2022-03-14 15:06:56 +05:30
Sivin VargheseandGitHub 578414d788 feat: Adds ability to delete contact without having to type name (#4155) 2022-03-11 17:00:55 +05:30
Sivin VargheseandGitHub 619441ce1c fixes: Showing vue warning in the console (#4152)
* fixes: Showing vue warn with PR#4100

* Minor fixes
2022-03-10 22:06:59 +05:30
Nithin David ThomasandGitHub 3c3b6f90c7 fix: Add base_url to the audio notification file (#4116) 2022-03-10 20:40:47 +05:30
Tejaswini ChileandGitHub 647efa12e7 fix: Attach instagram images with file type story_mentions (#4100) 2022-03-10 20:27:30 +05:30
b3545f42f1 fixes: Contact search is skipping the '+' sign for email. (#4142)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-10 11:15:41 +05:30
Pranav Raj SandGitHub fb03b6f434 chore: Upgrade rails to 6.1.4.7 to fix (#4143)
Fixes CVE-2022-21831
2022-03-10 11:01:40 +05:30
Pranav Raj SandGitHub 1aa7d6f7d8 fix: Update brand name in mailers (#4123) 2022-03-08 09:22:57 +05:30
giquieuandGitHub 96b719017b feat: Ability to send voice message to channel (#4064)
Created the possibility to send audio as an attachment via the dashboard.
The channels that can send audio are the same channels that can send any type of attachment.
Used RecordRTC (https://github.com/muaz-khan/RecordRTC) to capture the audio and Wavesurfer (https://github.com/katspaugh/wavesurfer.js) to display the audio waves.
RecordRTC can be used to record videos if necessary.

Fixes #1973
2022-03-04 19:43:07 +05:30
Aswin Dev P.SandGitHub b94e67f5d7 feat: Add agents filter in CSAT reports (#4106)
* add agents filter in csat reports
2022-03-04 03:49:26 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Pranav Raj S
c76b588850 chore(deps): bump marked from 2.0.3 to 4.0.10 (#3771)
* chore(deps): bump marked from 2.0.3 to 4.0.10

Bumps [marked](https://github.com/markedjs/marked) from 2.0.3 to 4.0.10.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v2.0.3...v4.0.10)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* use {marked}

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-03-04 14:53:40 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Muhsin KelothNithin David Thomas
a28b911132 chore(deps): bump url-parse from 1.5.7 to 1.5.10 (#4076)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-03-04 10:58:05 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6e4ae1a1bc chore(deps): bump commonmarker from 0.23.2 to 0.23.4 (#4108)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.2 to 0.23.4.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.2...v0.23.4)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-04 10:57:22 +05:30
Pranav Raj SandGitHub 9583a2dbad chore: Pass sso_account_id to select the account during SSO Login (#4103) 2022-03-03 20:49:51 +05:30
Sojan JoseandGitHub 11adfd2384 chore: remove unnecessary dependent destroy (#4104) 2022-03-03 13:02:02 +05:30
Pranav Raj SandGitHub 28d102f526 fix: Show new message screen instead of input field (#4102) 2022-03-03 12:36:31 +05:30
3d7ca61481 Show email signature with maximum height 8vh, fixes #4021 (#4063)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-03-02 15:28:56 +05:30
Sojan JoseandGitHub 7b9e4982cf Feat: Support MMS in SMS Channel ( Bandwidth ) (#4046)
Ability to send and receive MMS to bandwidth channel

fixes: #3961
2022-03-02 15:09:56 +05:30
4d458c2184 feat: Support respective input types in custom attributes - filters (#4032)
* Support differnt input types in custom attributes

* Handle list type custom attributes

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-03-02 14:16:42 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0582d15eb5 chore(deps): bump image_processing from 1.12.1 to 1.12.2 (#4095)
Bumps [image_processing](https://github.com/janko/image_processing) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/janko/image_processing/releases)
- [Changelog](https://github.com/janko/image_processing/blob/master/CHANGELOG.md)
- [Commits](https://github.com/janko/image_processing/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: image_processing
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 10:31:37 +05:30
915fe3897c chore: Add Github in contact social profiles (#4086)
* Add github in social links

* Code cleanup

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-03-01 14:33:26 +05:30
Muhsin KelothandGitHub f08d1b35d0 feat: Toggle automation status (#3991) 2022-03-01 14:14:23 +05:30
a3cb26a317 fix: AudioContext warning when loading widget on Chrome (#3956)
* fix: AudioContext warning when loading widget on Chrome

* minor fixes

* Minor fixes

* adds event on document

* Play audio from parent window through SDK

* Adds notification to dashboard

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2022-02-28 21:43:24 +05:30
eee89bf0d8 feat: Show cc from last email on reply editor (#3983)
* Adds last emails to reply editor

* Fixes bug in reply box

* Adds test cases

* Prevents private notes having cc bcc data

* Prevents private notes having cc bcc data

* Init reply head with values

* fix broken tests

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-02-28 21:42:50 +05:30
Muhsin KelothandGitHub 1de18391b4 fix: Handle invalid country code in contact details (#4081) 2022-02-28 19:48:13 +05:30
Muhsin KelothandGitHub bb16780278 chore: Upgrade utils to 0.0.5 (#4082) 2022-02-28 18:50:29 +05:30
4260441f8c Chore: clean up Reporting Events (#4044)
Tech debt clean up

Fixes #4057

Co-authored-by: Aswin Dev P S <aswin@chatwoot.com>
2022-02-28 18:16:12 +05:30
12c0be002e feat: Format time in reports (#4072)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-02-28 16:54:43 +05:30
Muhsin KelothandGitHub aff14b697f chore: Add webhook URL validation (#4080) 2022-02-28 15:44:02 +05:30
Pranav Raj SandGitHub 87a6266ddc fix: Add resetTriggered flag to fix reset loop (#4079) 2022-02-28 14:53:11 +05:30
Sojan cebb1bf871 Merge branch 'release/2.2.1' into develop 2022-02-28 14:12:36 +05:30
Sojan ed2772dd59 Merge branch 'release/2.2.1' 2022-02-28 14:12:22 +05:30
Sojan 4f19fa763c Bump version to 2.2.1 2022-02-28 14:04:40 +05:30
Muhsin KelothandGitHub 46c1734ba1 feat: Add additional attributes in setUser method (#3958) 2022-02-28 12:10:55 +05:30
9b615f11f1 fix: Consider timezone in the reports (#4027)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-02-28 10:56:24 +05:30
Sojan JoseandGitHub 4ca66c1195 fix: Automation loop on conversation_update (#4071) 2022-02-25 18:01:21 +05:30
Pranav Raj SandGitHub cc74bebc0f feat: Display Account context in the UI (#4069) 2022-02-25 16:36:36 +05:30
2c8a3ef3b2 fix: Message signature going with other channels message (#4024)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-02-25 16:36:10 +05:30
Pranav Raj SandGitHub 6c94768bdb feat: Add flat design for widget (#4065) 2022-02-25 16:18:18 +05:30
Nithin David ThomasandGitHub dcecbf4b80 Fix: show empty emails in chat (#4030) 2022-02-24 21:33:16 -08:00
Vishnu NarayananandGitHub d590b0ebc4 fix: nokogiri gem build failure in docker (#4060)
tar (child): xz: Cannot exec: No such file or directory¶

Starting in v1.13.2, the source archive used for libxml2 and libxslt is compressed with xz (previous versions were compressed with gzip. As a result, when compiling from source, your system will need to have xz installed in order to extract the source code for these libraries.
2022-02-23 23:27:19 +05:30
Pranav Raj SandGitHub 85f19fa25a chore: Show error messages from server in agent APIs (#4055) 2022-02-23 20:18:20 +05:30
Tejaswini ChileandGitHub 1ca1b4d36b feat: bulk actions to update conversation objects (#3934)
Added the endpoints for bulk updating conversation objects

Fixes: #3845 #3940 #3943
2022-02-23 16:53:36 +05:30
Sivin VargheseandGitHub 9059f5906a fix: Throwing error when click load more conversation (#4049) 2022-02-23 16:48:53 +05:30
Sojan JoseandGitHub eb0da2026f chore: Bundle update (#4038)
- address the nokogiri security issues
2022-02-22 16:06:04 +05:30
Aswin Dev P.SandGitHub e348db1e37 Fix: add option to choose 24 hour working slot (#4018)
* Add option to choose 24 hour working slot

* fix spec

* add check to update open hour and close hour for open all day

* update 24 hour working slot change in widget side

* add validation to check open_all_day and closed_all_day true at the same time
2022-02-22 01:28:49 -08:00
Muhsin KelothandGitHub 7ba24b90c4 feat: Add chatwoot:error sdk event (#3998) 2022-02-21 09:40:11 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3b015d4dd8 chore(deps): bump url-parse from 1.5.3 to 1.5.7 (#4016)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-20 11:30:19 +05:30
ea44a32758 feat: Add hCaptcha for public forms (#4017)
- added hCaptcha based verification for chatwoot signups

Co-authored-by: Sojan <sojan@pepalo.com>
2022-02-18 20:02:50 +05:30
Muhsin KelothandGitHub 80d83b401c feat: Show refresh modal on action cable disconnect (#4010) 2022-02-18 11:09:43 +05:30
Sivin VargheseandGitHub ea3e011d3f fix: Auto scroll to bottom when agent sends a message (#3764) 2022-02-17 20:42:13 +05:30
Sivin VargheseandGitHub 2586c8e7e5 fix: Lock icon colour issue in private messages (#4009)
* fix: Lock icon colour issue in private messages

* minor fixes
2022-02-17 18:58:53 +05:30
Sojan b9025a98d3 Merge branch 'release/2.2.0' into develop 2022-02-15 23:41:56 +05:30
Sojan b6c3d61163 Merge branch 'release/2.2.0' 2022-02-15 23:41:48 +05:30
Sojan 991f291c69 Bump version to 2.2.0 2022-02-15 23:39:57 +05:30
Fayaz AhmedandGitHub 5ad6db07b4 fix: Automation Bugs and minor enhancements (#3936) 2022-02-15 23:36:29 +05:30
Sivin VargheseandGitHub e345a4486d fix: Throwing NavigationDuplicated error (#3978) 2022-02-15 22:49:53 +05:30
Sojan JoseandGitHub 5ad7e93059 chore: Discard activities from email notifiable messages (#3989) 2022-02-15 18:15:45 +05:30
Pranav Raj SandGitHub 505c93c467 revert: "fix: html content is available and mail_part empty" (#3986)
Reverts de4e4c6
2022-02-15 17:19:28 +05:30
464e12ceb7 fix: Update auto reply and hide reply time for email inbox (#3985)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-02-15 17:11:28 +05:30
Aswin Dev P.SandGitHub e6f8895c1b feat: Group by filter in reports (#3973) 2022-02-15 17:10:49 +05:30
Sojan JoseandGitHub a703ef2de6 chore: Update translations (#3980) 2022-02-15 16:22:42 +05:30
94a473c9f8 chore: Delayed deploy of direct uploads (#3966)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-02-15 16:16:54 +05:30
Pranav Raj SandGitHub 2591a04c0b chore: Remove message_signature_enabled from users (#3982) 2022-02-15 12:10:53 +05:30
Nithin David ThomasandGitHub 351a3dc372 feat: Adds email signature form to profile settings (#3906) 2022-02-15 10:38:24 +05:30
Tejaswini ChileandGitHub d5c9193d1a feat: Add specs for reply-to changes (#3959) 2022-02-15 10:28:04 +05:30
Tejaswini ChileandGitHub de4e4c6f65 fix: html content is available and mail_part empty (#3964) 2022-02-14 20:22:58 +05:30
dependabot[bot]andGitHub f34a2e6115 chore(deps): bump puma from to 5.6.2, rails to 6.1.4.6 (#3969) 2022-02-14 20:09:21 +05:30
Pranav Raj SandGitHub 9c7044c81b fix: Use default from attribute if undefined (#3977) 2022-02-14 17:37:40 +05:30
Sojan JoseandGitHub 04148b95a6 chore: Update translations (#3937) 2022-02-14 17:11:43 +05:30
Sojan JoseandGitHub 3d73d8935a feat: Add the ability for a super admin to define account limits (#3946)
Fixes: #3773
2022-02-14 15:55:08 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
edd93ca4a3 chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 (#3970)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 15:53:13 +05:30
Nithin David ThomasandGitHub 2c15d5b4f3 fix: Custom attribute not getting changed on conversations (#3965) 2022-02-14 15:52:15 +05:30
Nithin David ThomasandGitHub 74d9203868 feat: Show the sender email address (#3974) 2022-02-14 15:46:20 +05:30
Tejaswini ChileandGitHub 25001689ec fix: Use to_i in campaign scheduled_at key (#3968) 2022-02-14 11:20:31 +05:30
Muhsin KelothandGitHub 2da618bd5e feat: Add conversation_created event in webhooks (#3949) 2022-02-14 09:44:25 +05:30
ba7f387dde chore: Reduces clutter in inbox settings page (#3960)
* chore: Reduces clutter in inbox settings page

* Fix spacing issues

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-02-11 08:38:42 +05:30
Sivin VargheseandGitHub 1115bd18ed fix: Icon colors are not recognizable in bubble (#3957) 2022-02-11 07:15:07 +05:30
e9a162e71a feat: Prefer reply-to over from in email channels (#3837)
Co-authored-by: root <root@support.loomio.com>
2022-02-10 19:20:30 +05:30
Nithin David ThomasandGitHub 4201b57315 fix: Fixes console error with image component in widget (#3955) 2022-02-10 12:48:22 +05:30
Sivin VargheseandGitHub 0ec3a56041 fix: Blank page after deleting contact (#3948) 2022-02-09 14:35:18 +05:30
Aswin Dev P.SandGitHub 4e416b4d51 Add openssl verify mode and email encryption for smtp configuration (#3885)
* Add openssl verify mode and email encryption for smtp configuration
* Add spec for code coverage
2022-02-08 03:26:13 -08:00
Muhsin KelothandGitHub 4ae9ed8f94 chore: Assign the conversation to agent who opens the conversation (#3925) 2022-02-08 16:39:19 +05:30
Pranav Raj SandGitHub 7b2ff2f112 feat: Show assignee name in folders view (#3933) 2022-02-08 10:38:14 +05:30
Sojan JoseandGitHub e2ff1b1a15 chore: Update German translations (#3928) 2022-02-08 10:12:34 +05:30
Sivin VargheseandGitHub d891c1e7b5 Fixes API call failing after opening the saved filter (#3932) 2022-02-08 10:11:56 +05:30
Pranav Raj SandGitHub 2a07eae69f fix: URL encode params on Platform API call (#3929)
Add URL encoding for the params in platform API calls.

Fixes: product#307
Fixes: #2186
2022-02-07 15:17:36 -08:00
375d943a48 fix: Avoid filter payload changing to null on load more conversations (#3926)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-02-07 22:14:21 +05:30
Sojan JoseandGitHub 4c0f6c1333 chore: Update translations (#3927) 2022-02-07 20:17:49 +05:30
97675c61ea chore: Update to the latest translations (#3923)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-02-07 17:19:34 +05:30
Muhsin KelothandGitHub f4c0ce5dfa chore: Assign to agent who create new message from contact panel (#3924) 2022-02-07 13:43:16 +05:30
Muhsin KelothandGitHub 9f37a6e2ba fix: Render valid urls only in custom attributes (#3921) 2022-02-07 13:04:27 +05:30
047070ad87 chore: Fix translations in Swedish language (#3765)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-02-07 12:44:05 +05:30
1a3d39a7f3 feat: Shows an alert while replying if chats are not assigned to them (#3867)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-02-07 12:27:20 +05:30
Muhsin KelothandGitHub a737f89c47 fix: Ongoing campaign URL validation (#3890) 2022-02-04 14:38:18 +05:30
Tejaswini ChileandGitHub a7987d4d1c feat: Add date custom filter (#3892) 2022-02-04 13:14:20 +05:30
SagarandGitHub 32673ea8b4 chore: Allow Self Hosted Instances to use Support Inbox within Dashboard for Agents (#3907) 2022-02-04 09:58:53 +05:30
Sojan JoseandGitHub 9454c6b14f Fix: Conversation filter permissions (#3908)
fixes: chatwoot/product#225
2022-02-03 18:25:28 -08:00
Sojan JoseandGitHub cf10f3d03b chore: Provider APIs for SMS Channel - Bandwidth (#3889)
fixes: #3888
2022-02-03 15:22:13 -08:00
Tejaswini ChileandGitHub fba7f40bee Fix: Custom filter distinct select (#3895) 2022-02-03 14:39:47 +05:30
Nithin David ThomasandGitHub 5c6958482f fix: Shows tooltip and avatar for template messages (#3898) 2022-02-03 12:14:34 +05:30
Pranav Raj SandGitHub 8dcb4a5ed4 chore: Add resolve action in Dialogflow Integration (#3900) 2022-02-03 12:05:39 +05:30
Pranav Raj SandGitHub dbb50e5923 fix: Update font-size/width to fix iOS input zoom (#3894) 2022-02-03 10:11:02 +05:30
Muhsin KelothandGitHub 903072ef14 chore: Add custom attributes in conversation webhook payload (#3839) 2022-02-03 10:05:56 +05:30
fc1f257793 feat: Clone automation rules (#3893)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-02-03 09:14:22 +05:30
Tejaswini ChileandGitHub 8821106da9 Fix: Added the backend validation for name (#3878)
- Added the backend validation for name
- Add message size constraint
2022-02-02 14:21:17 -08:00
Tejaswini ChileandGitHub e99ea0b582 feat: Email signature API support (#3874) 2022-02-02 19:37:33 +05:30
193a531e49 feat: Edit automation modal (#3876)
* Add automation modal

* Fix the v-model for automations

* Actions and Condition dropdowns for automations

* Fix merge conflicts

* Handle event change and confirmation

* Appends new action

* Removes actions

* Automation api integration

* Api integration for creating automations

* Registers vuex module to the global store

* Automations table

* Updarted labels and actions

* Integrate automation api

* Fixes the mutation error - removed the data key wrapper

* Fixed the automation condition models to work with respective event types

* Remove temporary fixes added to the api request

* Displa timestamp and automation status values

* Added the clone buton

* Removed uncessary helper method

* Specs for automations

* Handle WIP code

* Remove the payload wrap

* Fix the action query payload

* Removed unnecessary files

* Disabled Automations routes

* Ability to delete automations

* Fix specs

* Edit automation modal

* Edit automation modal and api integration

* Replaced hardcoded values

* Using absolute paths

* Update app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>

* Update app/javascript/dashboard/routes/dashboard/settings/automation/Index.vue

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>

* Intendation fix

* Disable automation route

* Minor fix

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-02-02 19:15:02 +05:30
91b9168fae feat: Add the ability to add new automation rule (#3459)
* Add automation modal

* Fix the v-model for automations

* Actions and Condition dropdowns for automations

* Fix merge conflicts

* Handle event change and confirmation

* Appends new action

* Removes actions

* Automation api integration

* Api integration for creating automations

* Registers vuex module to the global store

* Automations table

* Updarted labels and actions

* Integrate automation api

* Fixes the mutation error - removed the data key wrapper

* Fixed the automation condition models to work with respective event types

* Remove temporary fixes added to the api request

* Displa timestamp and automation status values

* Added the clone buton

* Removed uncessary helper method

* Specs for automations

* Handle WIP code

* Remove the payload wrap

* Fix the action query payload

* Removed unnecessary files

* Disabled Automations routes

* Ability to delete automations

* Fix specs

* Fixed merge conflicts

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: fayazara <fayazara@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-02-02 18:46:07 +05:30
1f3c5002b3 feat: Shows agent avatar for message sent by agent (#3884)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-02-01 16:34:54 +05:30
Vishnu NarayananandGitHub c0276d252a chore: add aws rds root cert for tls connection (#3812)
* chore: add aws rds cert for tls connection

* add aws rds ca cert

* remove intermediate ca cert
2022-02-01 16:01:25 +05:30
Fayaz AhmedandGitHub 52d1821cd3 feature: Filtering conversations and contacts with custom attributes (#3851) 2022-02-01 13:13:55 +05:30
Pranav Raj SandGitHub e0d24e0a73 chore: Use globalConfig in NetworkNotification (#3871) 2022-02-01 12:25:51 +05:30
Prithvi TharunandGitHub b1e1d7e423 fix: Update the copy to use inclusive language (#3880)
Fixes #3879
2022-02-01 11:12:20 +05:30
Tejaswini ChileandGitHub a95d249ec1 Feat: Custom attribute advanced filter (#3818) 2022-01-31 13:36:44 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a1034a70c4 chore(deps): bump node-fetch from 2.6.1 to 2.6.7 (#3862)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 11:41:12 -08:00
Tejaswini ChileandGitHub 357a374478 Fix: Update yarn (#3866) 2022-01-28 13:19:22 +05:30
Tejaswini ChileandGitHub 1467a8fa33 Fix: parse verification mail (#3864)
Email parsing logic was stripping of HTML tables which was causing the issue in this case.

Fixes: #3731
2022-01-27 15:45:26 -08:00
13eaff156a Added keybindings for commandbar (#3854)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-01-27 17:57:33 +05:30
Sivin VargheseandGitHub e7e46590a4 bug: Fixes sidebar does not show an active page for settings page (#3861) 2022-01-27 17:39:21 +05:30
Frederik KriewitzandGitHub 17018d392d chore: update deployment scripts to install sudo (#3841)
* Update setup_20.04.sh to install sudo
* Update setup_18.04.sh to install sudo
2022-01-27 16:55:27 +05:30
Tejaswini ChileandGitHub 69eaf3ff7f feat: Activestorage direct upload (#3768) 2022-01-27 15:57:22 +05:30
Sivin VargheseandGitHub cd6c9a8fe9 enhancement: Custom views (#3838)
* enhancement: Custom views

* Review fixes
2022-01-27 08:26:12 +05:30
Pranav Raj SandGitHub 5710b7559e fix: Fix email template to render the chat bubble properly (#3858) 2022-01-26 17:52:08 -08:00
Shivam ChaharandGitHub 8e6d8e7654 fix: Validate avatar only when it has changed (#3849) 2022-01-26 16:01:41 -08:00
59deffc7e3 feat: Ability to toggle conversation continuity via email (#3817)
Fixes: #3368
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-01-26 15:59:48 -08:00
Sojan JoseandGitHub 34e8ad9dc5 feat: Unify user and super admin credentials (#3830)
Fixes: #3061, #3489
2022-01-25 16:58:49 -08:00
Pranav Raj SandGitHub 23965fbaa3 fix: Return if window.$chatwoot is already defined (#3847) 2022-01-25 16:39:19 -08:00
8cff690640 feat: Support multiple file upload on dashboard (#3748)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-01-24 18:46:58 -08:00
Sivin VargheseandGitHub b304f5a826 feat: Adds the ability to delete a segment (#3836)
* feat: Adds the ability to delete a segment

* Minor fixes

* Small changes
2022-01-24 17:37:43 +05:30
Prithvi TharunandGitHub e90d064648 fix: Fixes typo in documentation on sidebar 2022-01-24 16:03:37 +05:30
Sivin VargheseandGitHub 504fc24fb3 feat: Add the ability to save filters for contact (#3791) 2022-01-21 14:11:59 -08:00
Sojan JoseandGitHub 693f2531ab feat: Support 360Dialog Interactive Templates (#3823)
fixes: #3795
2022-01-20 17:09:30 -08:00
Tejaswini ChileandGitHub e997aaceb7 Fix: Email Parsing for html fix (#3659) 2022-01-20 15:55:35 -08:00
Tejaswini ChileandGitHub a7c947aeae feat: Clone and update automation rules (#3782)
- endpoints to clone and update automation rules

fixes: #3740
2022-01-20 15:30:21 -08:00
ab864a86fd fix: File and emoji pickers are disabled by default (#3803)
File and emoji pickers should be enabled by default.

Fixes: #3560

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-01-19 22:20:04 -08:00
Shivam ChaharandGitHub 9617137688 chore: Account auto resolution time validation (#3651) 2022-01-19 13:16:21 +05:30
1b36143d27 fix: Fixes alignment of widget unread view close button (#3806)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-01-19 12:43:04 +05:30
241e7d0c29 Enhancement: Add background color to draggable blocks in the sidebar (#3778)
* add background

* update background color in contact info

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-01-19 11:26:52 +05:30
Sivin VargheseandGitHub 185f916b2a feat: Adds the ability to delete the saved custom views (#3780)
* feat: Adds the ability to delete the saved custom views

* Removed unused tag

* Review fixes

* Review fixes

* Update DeleteCustomViews.vue
2022-01-19 09:40:32 +05:30
Sojan 4a68d13310 Merge branch 'hotfix/2.1.1' into develop 2022-01-17 23:37:52 -08:00
Sojan ceb2b9673c Merge branch 'hotfix/2.1.1' 2022-01-17 23:37:45 -08:00
Sojan Jose 1749b4eb61 chore: Clean up assignment logic (#3763) 2022-01-17 23:36:54 -08:00
Sojan 346d89ecc0 Bump version to 2.1.1 2022-01-17 23:33:47 -08:00
c64cffb294 fix: Update the hardcoded scroll-width to match with the current table length (#3774)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-01-18 07:37:51 +05:30
6deb3764dc Fix: Pagination bug with filters payload (#3747)
* Removes the last operators value

* Moved removing the last operator to the payload generator

* Update app/javascript/dashboard/helper/filterQueryGenerator.js

This makes sure the last operator is never sent to the request

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>

* Fixed the test specs

* Fixed the intendation and added comments

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-01-17 20:35:53 +05:30
4398734bdf feat: Adds the ability to have custom view for conversations (#3666)
* feat: Adds the ability to save custom filters and display folders on the sidebar

* Minor fixes

* Review fixes

* Review fixes

* i18n fixes

* Shows conversations when the user click on the folder sidebar item

* Spacing fixes

* Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-01-17 09:18:54 +05:30
Sojan JoseandGitHub 290196d43b chore: Clean up assignment logic (#3763) 2022-01-13 21:38:10 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fcd2b892bf chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 (#3760)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-13 12:46:09 -08:00
cab5a3e53b chore: Add a redirect link to the conversation in success toast message (#3711)
When creating a conversation from the contacts tab now we can go directly to the conversation by clicking the link in the success message

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-01-13 11:15:40 -08:00
Muhsin KelothandGitHub 359caf754c fix: Update contact bio style to solve overflow (#3753) 2022-01-13 10:57:12 -08:00
Sivin VargheseandGitHub 7fcac532df fix: Update timestamp style on the private message from bot (#3758) 2022-01-13 10:54:52 -08:00
Nithin David ThomasandGitHub d57be3ffae fix: Allow private note without selecting a tweet (#3754) 2022-01-13 10:54:00 -08:00
Pranav Raj SandGitHub 5046dcaf61 fix: Update broken CSS Styles in liquid template (#3756) 2022-01-13 10:52:48 -08:00
Tejaswini ChileandGitHub 7df68c6388 Feat: Automations Actions (#3564) 2022-01-13 11:21:06 +05:30
Sojan JoseandGitHub 905fd62974 chore: Support Whatsapp Interactive messages (360Dialog) (#3751)
Render button and list reply clicks as text messages in agent dashboard

fixes: #3684
2022-01-12 19:42:23 -08:00
Sojan JoseandGitHub 1c99294c8c chore: Fix 360Dialog template message breakage (#3750)
Template parsing fails when regexp characters are present in templates.

Fixes: #3587
2022-01-12 17:41:42 -08:00
94209d29cb fix: Fixes widget unread view blocking parent page (#3658)
Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-01-12 12:27:16 -08:00
9c31d7c672 feat: Use vue-router on widget route management (#3415)
* feat: Add vue-router to widget

Co-authored-by: Pranav <pranav@chatwoot.com>

* Move to dynamic imports

* Move to routerMixin

* Fix popup button display

* Remove unnecessary import

* router -> route

* Fix open state

* Fix issues

* Remove used CSS

* Fix specs

* Fix specs

* Fix widgetColor specs

* Fix mutation specs

* Fixes broken lint errors

* Fixes issues with widget flow

Co-authored-by: Nithin <nithin@chatwoot.com>
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-01-12 16:25:27 +05:30
Sojan 991a42c417 Merge branch 'release/2.1.0' into develop 2022-01-11 19:28:49 -08:00
Sojan 4a902fce6d Merge branch 'release/2.1.0' 2022-01-11 19:28:42 -08:00
Sojan 5475746a87 Bump version to 2.1.0 2022-01-11 19:26:23 -08:00
Vishnu NarayananandGitHub acba07cf6e chore: revert GlobalConfig changes (#3702)
Priority to GlobalConfig changes are reverted and for the time being, env vars will take precedence if set.

Fixes #3699
2022-01-11 19:20:23 -08:00
Sojan JoseandGitHub f44be0b1e6 fix: SuperAdmin Improvements (#3733)
- Fix broken access tokens pages
- Fix broken avatar images in the super admin users tab
- Fix broken pagination links in super admin
- Add agent bot tabs

Fixes: #2021
2022-01-11 19:00:00 -08:00
Prithvi TharunandGitHub bec1266242 fix: Update shortcode -> short code (#3708)
Closes #3672
2022-01-11 15:20:52 -08:00
Sojan JoseandGitHub ebb04487a8 chore: Prevent null in Contact JSONB attributes (#3730) 2022-01-11 15:14:55 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
de37975be4 chore(deps): bump google-protobuf from 3.18.1 to 3.19.2 (#3714)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.18.1 to 3.19.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.18.1...v3.19.2)

---
updated-dependencies:
- dependency-name: google-protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 13:25:44 -08:00
Axel TietjeandGitHub 8a26d78623 chore: fix german translations (#3724) 2022-01-12 00:36:57 +05:30
Aswin Dev P.SandGitHub 7ee7062843 feat: Toggle to disallow users to send messages after a conversation is resolved (#3605) 2022-01-11 00:32:03 -08:00
Tejaswini ChileandGitHub a0884310f4 feat: Save automation rules (#3359) 2022-01-10 12:41:59 +05:30
Anisha-artandGitHub 9a9462f5cb fix: Removed extra space before "." (#3717)
Fixes Removed extra space before "." as mentioned in the issue: #3669
2022-01-09 22:27:45 -08:00
Prithvi TharunandGitHub 9b6f1df871 fix: Update copy in canned responses (#3716)
Fixes #3669
2022-01-09 22:26:35 -08:00
Anisha-artandGitHub ab4d63a006 Error with plurals in Invite members onboarding guide. Issue #3671 (#3718)
Updated "email address" to "email addresses" in the Invite your team members guide.
2022-01-10 10:29:16 +05:30
Fayaz AhmedandGitHub 0745ceb430 Chore: Update ninja keys to 1.1.9 (#3710) 2022-01-07 13:52:08 -08:00
Pranav Raj SandGitHub f7ed7756d9 chore: Use logo thumbnail instead of logo in the sidebar (#3706) 2022-01-06 15:09:01 -08:00
Muhsin KelothandGitHub e1fe4f09bc chore: Add subscription delete API (#3703) 2022-01-06 21:40:43 +05:30
Nayan PatelandGitHub a61dae0bb2 General updates and add CODEOWNERS (#3685) 2022-01-05 12:37:22 +05:30
Nithin David ThomasandGitHub fade94658a chore: Show scrollbar for sidebar only on hover (#3688) 2022-01-05 09:37:43 +05:30
Vishnu NarayananandGitHub e775d22b98 feat: add new view and controller to display app configs together (#3563)
fixes: #3578
2022-01-04 21:50:16 +05:30
Tejaswini ChileandGitHub e304ad27cb Chore: Custom filter api docs updated (#3668) 2022-01-04 13:10:29 +05:30
Prithvi TharunandGitHub 3e8ae3865f chore: Update the copy for new password in profile settings (#3676)
Fixes #3656
2022-01-02 22:43:50 -08:00
Nithin David ThomasandGitHub 223fb2b7e4 chore: Updates design of resolve context menu (#3667) 2021-12-29 22:24:11 +05:30
Nithin David ThomasandGitHub 666028a443 feat: Adds multiple path support for fluent icons (#3665)
* feat: Adds multiple path support for icons

* Changes dashboard icon
2021-12-29 18:01:49 +05:30
Sojan 8bdd7ba3e4 Merge branch 'release/2.0.2' 2021-12-28 21:56:59 +05:30
Sojan a1c77c8c4c Bump version to 2.0.2 2021-12-28 21:55:57 +05:30
Sojan JoseandGitHub 577e9905c6 chore: Fix issue with conversation assignment notifications (#3661)
- fixes issues with conversation assignment notifications not working in certain cases
2021-12-28 21:53:13 +05:30
Muhsin KelothandGitHub 9606abe251 chore: Fix Eslint warnings (#3654)
* Fix all the eslint warnings

* Revert the schema
2021-12-27 13:49:31 +05:30
Sojan 28da30f7e4 Merge branch 'release/2.0.1' into develop 2021-12-23 01:04:10 +05:30
Sojan 9f663ed4e5 Merge branch 'release/2.0.1' 2021-12-23 01:04:02 +05:30
Sojan acc55ea79c Bump version to 2.0.1 2021-12-23 01:02:56 +05:30
Sojan JoseandGitHub 13d6734977 chore: Minor API cleanups (#3645)
- exception list updated
- revert mail presenter changes
2021-12-23 00:55:49 +05:30
Tejaswini ChileandGitHub c57c975a0d bug: NoMethodError: undefined method `match' for in_reply_to (#3641)
Fixes #3615
2021-12-22 22:33:18 +05:30
Tejaswini ChileandGitHub 44486fc8e1 chore: Improve email parsing using email trimmer gem (#3611)
Email parsing using email_trimmer gem

Fixes: #3539 , #2954, #3572
2021-12-22 18:16:40 +05:30
Sojan JoseandGitHub 009abc1948 chore: API improvements (#3637)
- Unique validations for Inbox members and Team member objects
- Move notification processing to Async
2021-12-21 22:48:01 +05:30
Muhsin KelothandGitHub 262474166f chore: Add display id in all conversation notifications (#3635)
- Added conversation display id in push payload for the notifications conversation_creation and conversation_assignment
2021-12-21 19:59:22 +05:30
Nithin David ThomasandGitHub 307118b235 feat: Shows error message with retry for widget messages (#3594)
- Adds error message retry option for widget bubbles
- Adds a fallback for widget images with file type bubble
2021-12-21 12:02:43 +05:30
Sivin VargheseandGitHub 0130e08016 fix: Remove animated running numbers (#3604) 2021-12-20 18:19:59 -08:00
Nithin David ThomasandGitHub 83655f4ca4 feat: Show errors for message bubbles in dashboard (#3585) 2021-12-21 00:07:33 +05:30
6fe5484119 chore: Allow more filetypes in uploads (#3557)
- Allowing the ability to upload more common file types like zip, Docx etc
- Fallback for image bubble when the image URL isn't available

fixes: #3270

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2021-12-20 23:50:37 +05:30
Tejaswini ChileandGitHub 76e8acd3c6 Fix: Editable attrs presence check for the channel class (#3630) 2021-12-20 19:38:38 +05:30
Sivin VargheseandGitHub ad09c5dc5f bug: Fixes pressing enter key not submitting values in widget. (#3610) 2021-12-20 08:48:09 +05:30
Sojan JoseandGitHub f8cf0cd7c5 chore: Enable Slovak Language (#3614) 2021-12-19 11:38:21 +05:30
Sojan JoseandGitHub 46d2a8f218 chore: New Crowdin updates (#3616) 2021-12-19 11:38:02 +05:30
Amit KumarandGitHub 6069cd9eba chore: Contact builder ignores custom attributes (#3571)
This is incorrect as per the documentation here: https://www.chatwoot.com/developers/api/#operation/create-a-contact
This allows setting the proper attributes when creating a contact
2021-12-19 10:59:03 +05:30
Sojan JoseandGitHub 8d65608666 chore: Clean up migrations (#3613)
Fixes: #3530
2021-12-19 09:47:07 +05:30
Aswin Dev P.SandGitHub 5ee209c079 chore: Fix user email re-confirmation flow (#3581)
Users can change their email from profile settings. They will be logged out immediately. Users can log in again with the updated email without verifying the same. This is a security problem.

So this change enforce the user to reconfirm the email after changing it. Users can log in with the updated email only after the confirmation.

Fixes: https://huntr.dev/bounties/7afd04b4-232e-4907-8a3c-acf8bd4b5b22/
2021-12-16 19:32:49 +05:30
Sivin VargheseandGitHub e0c9687f5e bug: Fixes irregular padding on agent selector in report page (#3593)
* bug: Fixes irregular padding on agent selector in report page

* code climate fixes
2021-12-16 13:20:35 +05:30
Sivin VargheseandGitHub 93f384a3ec enhancement: Changes button design for tables in settings page (#3553)
* enhancement: Changes button design for tables in settings page

* Minor fixes

* Review fixes
2021-12-16 13:00:55 +05:30
Tejaswini ChileandGitHub 9984edd3ef Feat: Manage conversation for tweets based on the tweet flag (#3353)
Add tweet conversation only if tweets are enabled.

Fixes #1961
2021-12-16 00:24:50 +05:30
Sivin VargheseandGitHub e2e459a1ac bug: Fixes space missing issue with message bubbles after sending messages (#3562) 2021-12-15 19:12:11 +05:30
Tejaswini ChileandGitHub b7336eca65 Fix: Add max retries for all jobs (#3582) 2021-12-15 17:31:16 +05:30
Nithin David ThomasandGitHub 6ae06f2c7a fix: Fixes wrong color for note tab in reply box (#3566)
* fix: Fixes wrong color for note tab in reply box

* Changes color for warning button

* Fixes spacing
2021-12-14 20:09:52 +05:30
Vishnu NarayananandGitHub 7986d61b6f feat: allow users to select components to install when using linux script (#3528)
Provide a choice to select the components to install. The script
should be able to just install chatwoot alone. Postgres, redis,
SSL certs via letsencrypt and nginx as a webserver should be
installed after confirmation.

Fixes: #3513
2021-12-14 18:26:57 +05:30
Nithin David ThomasandGitHub c2191e48b1 Chore: Fixes icon size in button (#3555)
* Chore: Fixes icon size in button

* Changes normal button to woot button
2021-12-14 17:37:25 +05:30
Vishnu NarayananandGitHub ac372f188d chore: add line messenger in readme (#3552) 2021-12-13 14:19:12 +05:30
Sivin VargheseandGitHub 178cb34319 bug: Fixes expanded reply box is not closing after the message is sent (#3537) 2021-12-13 12:37:21 +05:30
Tejaswini ChileandGitHub c2519ea1ea Fix: fixing mail to and in_reply_to issues (#3451) 2021-12-10 19:42:26 +05:30
Pranav Raj SandGitHub dcdeaa7954 chore: Remove license tag from Readme 2021-12-09 02:30:33 -08:00
arabakevinandGitHub 0b7eb2e2c1 chore: Fix typo in enterprise license (#3535) 2021-12-09 02:22:37 -08:00
Pranav Raj SandGitHub 2defe4a8fe chore: Fix line breaks in Readme.md 2021-12-09 02:19:16 -08:00
Pranav Raj SandGitHub b0af3f2498 chore: Update Readme.md 2021-12-09 02:16:05 -08:00
Sojan JoseandGitHub 5feb5aba72 Merge tag 'v2.0.0' into develop
v2.0.0
2021-12-09 08:17:34 +00:00
Sojan JoseandGitHub a7623041bf Merge branch 'release/2.0.0' 2021-12-09 08:17:15 +00:00
Sojan JoseandGitHub d268f155e4 Bump version to 2.0.0 2021-12-09 06:59:23 +00:00
b1eea7f7d1 chore: Introduce enterprise edition license (#3209)
- Initialize an "enterprise" folder that is copyrighted.
- You can remove this folder and the system will continue functioning normally, in case you want a purely MIT licensed product.
- Enable limit on the number of user accounts in enterprise code.
- Use enterprise edition injector methods (inspired from Gitlab).
- SaaS software would run enterprise edition software always.

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-12-09 12:07:48 +05:30
Pranav Raj SandGitHub 2f63ebb8a6 fix: Add fixes for sentry errors (#3522)
- Add fixes for sentry errors
2021-12-09 11:50:28 +05:30
Pranav Raj SandGitHub 2be71e73dc feat: Add a view for mentions (#3505)
- Added a new table mentions for saving user mentions
- Added a filter conversation_type in the API
- Added a view to see the mentions
2021-12-09 11:20:14 +05:30
Sojan JoseandGitHub 1db82f235d Chore: Improve confirmation flow for agents (#3519)
- Agents are redirected to the password reset page which confirms the agent as well as sets a new password.
2021-12-09 11:11:46 +05:30
9306b725d8 chore: Fix pre-commit hooks (#3525)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-12-08 17:32:00 -08:00
Muhsin KelothandGitHub 3ee6b7d6e9 chore: Add the ability to use same key for conversation and contact (#3526) 2021-12-08 20:15:27 +05:30
Tejaswini ChileandGitHub 35130bc83e Fix: Add foreign key with delete cascade for destroy_async (#3527) 2021-12-08 18:03:27 +05:30
Tejaswini ChileandGitHub f609a28c6b Fix: Added facebook login scope with new advanced access for page read (#3518) 2021-12-08 16:17:49 +05:30
Sivin VargheseandGitHub 714c10dc66 bug: Fixes error with the secondary menu. (#3524) 2021-12-08 14:20:59 +05:30
f5d79ffe58 chore: Updates icon for network disconnect alert (#3514)
* chore: Upadates icon for network disconnect alert

* Changes background color

* Review fixes

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2021-12-07 23:45:36 +05:30
Nithin David ThomasandGitHub 824101bc30 fix: Fixes cc bcc being sent when mail head is empty (#3515)
* fix: Fixes cc bcc being sent wrongly with emails

* fixes values not sycned to parent component

* Update app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue

* Review fixes
2021-12-07 23:44:32 +05:30
Muhsin KelothandGitHub 46afcd9348 fix: Index custom attribute uniqueness on account (#3516)
- Move custom attribute uniqueness validation to account
2021-12-07 18:20:47 +05:30
Nithin David ThomasandGitHub 6b025816f5 fix: Update sidebar toggle icon breaking message view (#3512) 2021-12-06 08:41:34 -08:00
Sivin VargheseandGitHub 3c72a2759f enhancement: Improves sidebar open/close toggle design (#3507) 2021-12-06 18:16:36 +05:30
a98f10130b bug: Fix cannot copy text content from sidebar (#3506)
* bug: Fixes cannot copy text content from sidebar .

* fixes cannot copy issue in sidebar

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-12-06 14:38:04 +05:30
Muhsin KelothandGitHub b46ee5e580 Fix: Conversation status event in widget side (#3509) 2021-12-03 22:45:00 +05:30
thedev105andGitHub 6d378eb206 Fix: Update contact validation messages (#3500)
Fixes #3476
2021-12-03 13:19:11 +05:30
d7cfe6858e feat: Add advanced contact filters (#3471)
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-12-02 19:12:44 -08:00
Sivin VargheseandGitHub 1c29f5bbe4 bug: Fixes missing inbox icon in Twillio SMS channel. (#3502) 2021-12-02 11:47:49 +05:30
8b4134c790 fix: Update route permissions in the new primary menu (#3499)
* fix: Display rolewise primary sidebar

* Fix issues with roles

* Fix active style

* Fix accessible menu

* Fix key missing

* Changes menu icon size

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2021-12-02 11:02:43 +05:30
Sojan JoseandGitHub b826319776 chore: create CONTRIBUTING.md 2021-12-01 23:21:02 +05:30
Muhsin KelothandGitHub 025bbf1bfb chore: Add i18n survey transaltion in crowdin (#3496) 2021-12-01 18:25:22 +05:30
Nithin David ThomasandGitHub 2a5932cf1b chore: Fixes error in reply box code (#3494) 2021-12-01 16:04:02 +05:30
0a18993b70 fix: Changes thumbnail colors to new color scheme (#3483)
* Enhancement: Updates sidebar to a new design (#2733)

* feat: Changes primary navbar to new design (#2598)

* feat: updates design for secondary navbar (#2612)

* Changes primary nvbar to new design

* Updates design for contexual sidebar

* Fixes issues with JSON

* Remove duplication of notificatons in Navigation

* Fixes broken tests

* Fixes broken tests

* Update app/javascript/dashboard/components/layout/AvailabilityStatus.vue

* Update app/javascript/dashboard/components/layout/AvailabilityStatus.vue

* Update app/javascript/dashboard/components/layout/SidebarItem.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/components/layout/SidebarItem.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/modules/sidebar/components/Secondary.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Chore: Update design changes to features

* Fixes menu transitions and refactors code

* Refactors sidebar routeing logic

* lint error fixes

* Fixes dropdown menu styles

* Fixes secondary new item links

* Fixes lint scss issues

* fixes linter issues

* Fixes broken test cases

* Update AvailabilityStatus.spec.js

* Review feedbacks

* Fixes add modal for label

* Add tooltip for primary menu item

* Tooltip for notifications

* Adds tooltip for primary menu items

* Review fixes

* Review fixes

* Fix merge issues

* fixes logo size for login pages

* fixes Merge breaks with styles

* fix: Changes thumbnail colors to new color scheme

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-12-01 15:18:41 +05:30
b01d032d0d feat: Updates sidebar to accomodate sub menu (#3416)
* Enhancement: Updates sidebar to a new design (#2733)

* feat: Changes primary navbar to new design (#2598)

* feat: updates design for secondary navbar (#2612)

* Changes primary nvbar to new design

* Updates design for contexual sidebar

* Fixes issues with JSON

* Remove duplication of notificatons in Navigation

* Fixes broken tests

* Fixes broken tests

* Update app/javascript/dashboard/components/layout/AvailabilityStatus.vue

* Update app/javascript/dashboard/components/layout/AvailabilityStatus.vue

* Update app/javascript/dashboard/components/layout/SidebarItem.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/components/layout/SidebarItem.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/modules/sidebar/components/Secondary.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Chore: Update design changes to features

* Fixes menu transitions and refactors code

* Refactors sidebar routeing logic

* lint error fixes

* Fixes dropdown menu styles

* Fixes secondary new item links

* Fixes lint scss issues

* fixes linter issues

* Fixes broken test cases

* Update AvailabilityStatus.spec.js

* Review feedbacks

* Fixes add modal for label

* Add tooltip for primary menu item

* Tooltip for notifications

* Adds tooltip for primary menu items

* Review fixes

* Review fixes

* Fix merge issues

* fixes logo size for login pages

* fixes Merge breaks with styles

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-12-01 12:45:39 +05:30
Pranav Raj SandGitHub c792cfc0be feat: Use Fluent SVG icons on the dashboard (#3482) 2021-11-30 21:03:18 -08:00
Pranav Raj SandGitHub 98be3b33c1 fix: Update missing method onNewToastMessage (#3481) 2021-11-30 10:57:44 -08:00
Sojan JoseandGitHub 0115b4ddc4 chore: validation spec for schedules (#3480)
We had instances where after copy-pasting the schedule block, the dev forgets to change the schedule key,
This would break some of the scheduled jobs without explicit errors.

this PR add a spec that will prevent it from happening
2021-11-30 21:44:30 +05:30
Sojan JoseandGitHub d5c30760a7 chore: Whatsapp templates fix for 360 dialog (#3479)
Fixes: #3426
2021-11-30 20:50:35 +05:30
Pranav Raj SandGitHub 0899f62912 fix: Use bus.$off to remove listeners on destroy (#3478) 2021-11-30 10:45:36 +05:30
Sojan JoseandGitHub 86dfdfb9ab chore: fix scheduled jobs (#3473)
- fixes the duplicate schedule job key
2021-11-27 17:08:40 +05:30
Shivam ChaharandGitHub bfcde9b022 chore: Conversation history in email notifications (#3414)
Display recent messages in the notification email when a new conversation is created.

Fixes: #2041
2021-11-27 15:38:27 +05:30
Akhil G KrishnanandGitHub 6a98a812e7 Fix: Outgoing email sender header translation issue (#3393)
Outgoing email-sender header translation fix for "from"

Fixes #3380
2021-11-27 09:46:12 +05:30
Shivam ChaharandGitHub a4ee8ee239 Chore: Improve conversation auto resolution (#3405)
Fixes: #1583
2021-11-27 09:26:18 +05:30
SanjuandGitHub 89f9f39e6e chore: add account id in account settings page (#3365)
Fixes: #3317
2021-11-27 09:07:09 +05:30
Santhosh CandGitHub b326da7d94 feat: Ability to remove user profile picture (#3156)
Fixes #3107
2021-11-27 00:56:07 +05:30
Sojan JoseandGitHub add004a56e Chore: API Improvements (#3469) 2021-11-27 00:48:46 +05:30
Sivin VargheseandGitHub 55843c5bad chore: fixes filter input multiselect height issue (#3466) 2021-11-26 13:41:09 +05:30
2c3c1888f1 Enhancement: Show unread marker on widget bubble (#3390)
* add unread marker

* add removeClass in IFramehelper

* Update app/javascript/sdk/sdk.js

* Update app/javascript/sdk/sdk.js

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-11-25 20:25:14 +05:30
Tejaswini ChileandGitHub b0370ce44d Feat: Fix contact filter pagination (#3463) 2021-11-25 12:01:31 +05:30
Vishnu NarayananandGitHub 3a48e08fe0 feat: migrate facebook env vars to globalConfig (#3369)
Migrate facebook env vars to globalConfig and make it editable from the super admin UI.
2021-11-25 00:55:26 +05:30
Nithin David ThomasandGitHub c23e2c23d4 chore: Update design for filters (#3423) 2021-11-24 14:26:32 +05:30
Tejaswini ChileandGitHub 330a97b5c5 Fix: contact filter values (#3456) 2021-11-24 12:58:00 +05:30
Muhsin KelothandGitHub 00143f7ee5 fix: Render checkbox if string value passed (#3453) 2021-11-24 11:02:45 +05:30
Sivin VargheseandGitHub da8f9d0337 feat: Add support for List and Checkbox in Custom Attributes (#3439) 2021-11-24 09:00:55 +05:30
Pranav Raj SandGitHub 0530e9491c fix: Use role permissions from accounts instead of role attribute (#3445)
Use role permissions from accounts instead of the role attribute

Fixes: #2557
2021-11-23 17:37:01 +05:30
Tejaswini ChileandGitHub 11cd7fd6c5 Feat: Added support changes for contact filters (#3435) 2021-11-23 16:36:44 +05:30
Tejaswini ChileandGitHub 9103fbbdde chore: Update schema files (#3438)
- removes the unintended table from schema files
2021-11-23 16:04:01 +05:30
Sivin VargheseandGitHub e182b59002 bug: fixes link icon doesn't work in the campaign editor (#3447) 2021-11-23 15:26:26 +05:30
Fayaz AhmedandGitHub 7f8204a9da fix: Required check for Conversation filters (#3442) 2021-11-23 09:42:47 +05:30
Sojan 0033a35ab8 Merge branch 'hotfix/1.22.1' into develop
# Conflicts:
#	db/schema.rb
2021-11-22 23:35:44 +05:30
Sojan 5db9d397c5 Merge branch 'hotfix/1.22.1' 2021-11-22 23:34:37 +05:30
791d90c6b7 chore: Migrate PubSub Token to contact inbox (#3434)
At present, the websocket pubsub tokens are present at the contact objects in chatwoot. A better approach would be to have these tokens at the contact_inbox object instead. This helps chatwoot to deliver the websocket events targetted to the specific widget connection, stop contact events from leaking into other chat sessions from the same contact.

Fixes #1682
Fixes #1664

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-11-22 23:32:17 +05:30
Pranav Raj SandGitHub 1a8b8f0900 chore: Move referrerHost to appConfig store (#3433) 2021-11-22 15:05:29 +05:30
Vishnu NarayananandGitHub 1be7c2d72c chore: add DigitialOcean 1-click deployment button (#3421) 2021-11-22 13:20:35 +05:30
Pranav Raj SandGitHub e93e43532a fix: Pass label title instead of id to filter API (#3432) 2021-11-22 12:06:43 +05:30
Sojan JoseandGitHub c332e2df12 chore: Add Code of Conduct 2021-11-20 12:08:45 +05:30
Pranav Raj SandGitHub da163cc1f7 chore: Move unscoped styles to global stylesheet (#3422) 2021-11-19 16:09:20 +05:30
Tejaswini ChileandGitHub 7b44bf5b78 Fix: Filter with label name (#3418) 2021-11-19 13:55:40 +05:30
Aswin Dev P.SandGitHub 24e6a92297 feat: IMAP Email Channel (#3298)
This change allows the user to configure both IMAP and SMTP for an email inbox. IMAP enables the user to see emails in Chatwoot. And user can use SMTP to reply to an email conversation.

Users can use the default settings to send and receive emails for email inboxes if both IMAP and SMTP are disabled.

Fixes #2520
2021-11-19 11:52:27 +05:30
Fayaz AhmedandGitHub 8384d0b38e chore: Update dropdown z-index to be on top of contact details pane (#3411) 2021-11-18 19:55:32 +05:30
c2333214af feat: Add Advanced Conversation Filters (#3239)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
2021-11-18 19:15:02 +05:30
Muhsin KelothandGitHub bf96e8b68d choore: Change values to attribute_values in custom attributes (#3413) 2021-11-18 18:59:28 +05:30
Pranav Raj SandGitHub a3ba8f9e35 feat: Remove ionicons v2 dependency on widget (#3402) 2021-11-18 15:18:51 +05:30
Muhsin KelothandGitHub c2b4991fd8 feat: Add automation route (#3410) 2021-11-18 14:09:55 +05:30
Akhil G KrishnanandGitHub b81a9f2010 Chore: Replaced dependent destroy with dependent destroy_async in all models (#3249) 2021-11-18 10:32:29 +05:30
VinayakandGitHub 4eeaadbd5b chore: Added SMTP_TLS and SMTP_SSL in .env.example
Added SMTP_TLS and SMTP_SSL in .env.example

Fixes #3396
2021-11-17 22:11:27 +05:30
Jan-DavidandGitHub e500d1216b Fix: Make swagger doc compliant to OpenAPI (#3394)
This fixes issues in the swagger.json file. The motivation to do so is to be able to generate API clients using https://openapi-generator.tech Doing so will require further changes to the api spec, but this seems like a good first step since it is now "valid" according to editor.swagger.io and openapi-generator validate.

Fixes #2806
2021-11-17 18:55:15 +05:30
Pranav Raj SandGitHub d227a56747 fix: Set default value of sortBy to empty string (#3406) 2021-11-17 18:27:14 +05:30
Shivam ChaharandGitHub fec4a29081 Feat: Include previous messages in mention/assign notifications email (#3385) 2021-11-17 18:05:53 +05:30
Muhsin KelothandGitHub 9ea42ebff2 chore: Add the support for list and checkbox in custom attribute model (#3400)
ref: #3399
2021-11-16 23:25:19 +05:30
Sojan e5a80195ab Merge branch 'master' into develop 2021-11-15 21:52:59 +05:30
Sojan 928580dd41 Merge branch 'release/1.22.0' into develop 2021-11-15 21:50:54 +05:30
Sojan 01577acb2e Merge branch 'release/1.22.0' 2021-11-15 21:50:36 +05:30
Sojan 52c850f8b6 Bump version to 1.22.0 2021-11-15 21:49:14 +05:30
Pranav Raj SandGitHub 809509404b fix: Set cc, bcc default to empty string if unavailable (#3387) 2021-11-15 21:05:24 +05:30
Sojan JoseandGitHub acb06e7df6 chore: Prevent notification email loop (#3386)
Configuring an agent email also as a support email inbox leads to conversations getting created in a loop if notifications were also configured to the same email.
2021-11-15 19:15:51 +05:30
e849759e15 feat: Add Command bar for improved productivity (#3352)
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2021-11-15 17:22:44 +05:30
1e3f255ece chore: Update translations, fix Crowdin issues
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-11-15 17:18:56 +05:30
Muhsin KelothandGitHub a2764e5c1d chore: Update deleteCustomAttribute method in SDK (#3334) 2021-11-15 14:56:35 +05:30
Muhsin KelothandGitHub c2db8a1fd7 chore: Add the option to edit custom attribute display name (#3382) 2021-11-15 12:45:47 +05:30
Muhsin KelothandGitHub bb18516403 chore: Update conversation sidebar items default order (#3381) 2021-11-15 10:34:57 +05:30
Muhsin KelothandGitHub d1a62fe6ab feat: Add the option for changing the contact/conversation sidebar items order (#3362) 2021-11-13 12:32:53 +05:30
Sojan JoseandGitHub f68a4b55bb chore: Update the translations for CHAT_STATUS_FILTER_ITEMS (#3375) 2021-11-13 11:53:59 +05:30
Sojan JoseandGitHub 987c8f5c7c chore: Fix translations breaking the chat filter (#3374)
fixes: #2552
2021-11-13 11:45:18 +05:30
Sojan JoseandGitHub e011b4566b chore: New Translation updates (#3371) 2021-11-12 23:40:08 +05:30
Tejaswini ChileandGitHub 37a36349f2 feat: Update Swagger for the custom filter endpoint (#3367) 2021-11-12 19:28:03 +05:30
cf5f6d5a74 feat: enable Dialogflow integration all inboxes except email (#3285)
Fixes #2461

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-11-12 17:53:03 +05:30
Sojan JoseandGitHub d78cb67a2a chore: Fix conversation status in webhooks (#3364)
- fix the wrong conversation status being sent in webhooks
- additional information in websocket events
- refactor activity messaging code
- move activity message generation to background job to stop the callback loop
2021-11-12 16:17:59 +05:30
b119d9e729 fix: Remove * as import from conversation module (#3366)
* fix: Remove * as import from conversation module

* Remove * as import from conversation test spec

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2021-11-12 13:41:43 +05:30
Tejaswini ChileandGitHub 564fa5f392 feat: Update custom filter for present/not_present operator (#3361) 2021-11-12 11:30:39 +05:30
Vishnu NarayananandGitHub 58aae7a4a9 fix: make GlobalConfig migrated from .env editable from UI (#3360) 2021-11-11 19:31:25 +05:30
Muhsin KelothandGitHub c6326993df feat: Show pre-chat form before triggering the campaign (#3215) 2021-11-11 19:02:16 +05:30
Muhsin KelothandGitHub 76370267f3 feat: Render contact custom attributes in contact/conversation sidebar (#3310) 2021-11-11 15:23:33 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e12edb51a2 chore: Bump axios from 0.21.1 to 0.21.2 (#3358)
Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-11 15:05:59 +05:30
JakobandGitHub 1dfa173b3a fix: Limit rails, postgres and redis container access to localhost (#3354)
This change limits the rails, redis and postgres container on `docker-compose.production.yaml` file to localhost only. 

The default docker-compose configuration will expose redis, postgres and rails directly to the internet when the service is started on a virtual machine.

In most cases that is not what you want, and especially for redis and postgres exposing the services could be a potential security risk. By adding 127.0.0.1 access is limited to localhost and access is only possible after nginx oder another web server is configured as reverse proxy.

Note: Moving forward, anyone using docker-compose.production.yaml need to have something like Nginxto proxy the requests to the container.

If you want to verify whether the installation is working, try curl -I localhost:3000 to see if it returns 200. Also, you could temporarily drop the 127:0.0.1:3000:3000 for rails to 3000:3000 to access your instance at http://:3000. It's recommended to revert this change back and use Nginx in front.

Approved-by: Vishnu Narayanan <vishnu@chatwoot.com>
2021-11-11 14:43:25 +05:30
Sojan JoseandGitHub a4c87f2052 chore: Handle attachments in Whatsapp Channel (#3299)
send and receive attachments in 360Dialog WhatsApp channels
2021-11-11 13:03:48 +05:30
sarzynskiandGitHub b3e313a200 fix: Ensure HMAC mandatory when enabled (#3350)
Add missing condition checking if HMAC is mandatory.

Fixes #3349
2021-11-11 09:48:38 +05:30
Tejaswini ChileandGitHub c0f5a59cf8 Bug: Instagram render template message twice (#3313) 2021-11-10 18:32:46 +05:30
Tejaswini ChileandGitHub 358171062e Feat: Add Null values at the last while sorting (#3292)
* Add Null values at the last while sorting
* Add contacts at last with special character in it
* Optimize SQL order and direction
2021-11-10 14:11:00 +05:30
6cfd7d3836 feat: autogenerate vapid keys for push notifications (#3128)
* feat: Autogenerate push notification keys
* add vapid service class and remove pushkey model
* add spec for vapid service
* unset vapid env keys
* Unset VAPID_PRIVATE_KEY env variable

Co-authored-by: Sojan Jose <sojan@chatwoot.com>
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2021-11-09 21:36:32 +05:30
Nithin David 0c9b682329 Revert "feat: Updates widget message state to support multiple conversations"
This reverts commit a34bb565af.
2021-11-09 18:34:55 +05:30
Nithin David a34bb565af feat: Updates widget message state to support multiple conversations 2021-11-09 18:23:20 +05:30
Pranav Raj SandGitHub d00b8df952 fix: Revert translated keys in conversation status (#3337) 2021-11-08 17:03:34 +04:00
Akhil G KrishnanandGitHub 4e01278ea8 TEAM_AVAILABILITY dutch translation issue fixed (#3324) 2021-11-08 17:44:02 +05:30
wsuffandGitHub 26f36548c2 chore: Update message limit to Twilio recommended 320 characters (#3333) 2021-11-08 10:27:00 +04:00
A. VerdeandGitHub 81708f92a8 chore: Fcm notification priority (#3319) 2021-11-08 11:32:07 +05:30
Vishnu NarayananandGitHub 97ee1bfa97 feat: add GlobalConfigService to support env vars migration (#3288) 2021-11-03 21:34:42 +04:00
Sivin VargheseandGitHub 03b1a3d045 feat: Adds support for paste attachment with keys. (#3293)
* copy paste files

* Minor fixes

* Adds support for pasting attachment

* Minor files

* Review fixes
2021-11-02 10:05:49 +05:30
Sivin VargheseandGitHub 0651b11fda bug: Fixes the height issue of attachment image preview. (#3296)
* bug: Fixes the height issue of attachment image preview

* fixes codeclimate issue
2021-11-01 21:00:14 +05:30
Tejaswini ChileandGitHub 372bd75028 feat: Add filter APIs for Contacts and Conversations (#3264) 2021-11-01 12:27:04 +04:00
Hugo SartiandGitHub 68fa694268 fix: Disable typing indicator for user when agent is typing a private note (#3303) 2021-11-01 12:20:07 +04:00
Tejaswini ChileandGitHub 000c7603d6 feat/3247 Escape html tags from the slack messages (#3306) 2021-11-01 12:08:10 +05:30
Muhsin KelothandGitHub a3b6e5655d Disallow editing attribute key and type (#3305) 2021-10-30 12:14:09 +05:30
Muhsin KelothandGitHub ab77e03c92 feat: Render conversation custom attributes (#3065) 2021-10-30 07:09:46 +05:30
Sojan JoseandGitHub 69f55a25b6 chore: Minor API fixes (#3290)
- Log whether web-hook was successful
- Inbox update shouldn't need channel params
2021-10-28 15:26:20 +05:30
Aswin Dev P.SandGitHub 46867e89cb feat: Ability to specify a subject line for outbound emails (#3168) 2021-10-27 13:09:29 +05:30
Sojan JoseandGitHub 2f2d2b4f73 chore: Update translations (#3289) 2021-10-26 23:01:52 +05:30
fcbe68141d fix: Show twilio channel name based on medium (#3284)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-26 16:00:00 +05:30
Vishnu NarayananandGitHub ac46d0c855 feat: add domain check prompt for linux installation script (#3282)
- move domain check to beginning to have all user input at the start
- notify user to point DNS if they plan to use a domain with Chatwoot
2021-10-25 21:56:26 +05:30
SanjuandGitHub 74db319a7c feat: Add video preview & player in conversation (#3201) 2021-10-25 19:46:37 +05:30
98e9fedfa6 fix: Resolve contacts filter when entered with contry code (#3241)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-10-25 19:26:11 +05:30
f2c6799444 feat: Update translations (#3279)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-25 19:23:58 +05:30
Jay ClarkandGitHub 5119e7a79e fix: Update z-index for chevron in contact sidepanel (#3268)
Signed-off-by: Jay Clark <jay@jayeclark.dev>
2021-10-25 19:14:13 +05:30
Pranav Raj SandGitHub 8e6ce3a813 feat: Add notes for Contacts (#3273)
Fixes #2275
2021-10-25 18:35:58 +05:30
Viraj BahulkarandGitHub e5e73a08fe fix: Render missing captions for telegram media attachments (#3257) 2021-10-25 15:52:06 +05:30
Akhil G KrishnanandGitHub 84df9c807d chore: Add climate-control gem for handling the test ENV vars (#3267) 2021-10-25 13:13:25 +05:30
Sojan JoseandGitHub 06289b03ea chore: Add Contact Note APIs (#3266) 2021-10-24 12:40:30 +05:30
Sivin VargheseandGitHub 19855a90e2 fix: Remove duplicate attachment downloads (#3262) 2021-10-22 19:23:05 +05:30
Jan-DavidandGitHub 09643b63b0 fix: Use correct German translation of 'disabled' (#3255) 2021-10-22 10:42:13 +05:30
Tejaswini ChileandGitHub 658a511b88 feat: Conversation and contact endpoint (#3198) 2021-10-20 18:14:56 +05:30
Muhsin KelothandGitHub b0041ccf3f fix: Close button click action in contact details sidepanel (#3245) 2021-10-20 09:05:08 +05:30
050df43789 feat: Adds sound alert notification for new messages on the widget (#3181)
* feat: Adds sound alert notification for new messages on the widget

* Review fixes

* uses absolute path

* Minor fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-10-18 06:09:04 -07:00
Sojan 3b3ab39ca3 Merge branch 'release/1.21.1' into develop 2021-10-18 14:34:08 +05:30
Sojan 7015609577 Merge branch 'release/1.21.1' 2021-10-18 14:34:01 +05:30
Sojan 58ad0e6fd6 Bump version to 1.21.1 2021-10-18 14:33:46 +05:30
Sojan b8ea8e5b5e Merge branch 'master' into develop 2021-10-18 14:32:33 +05:30
Vishnu NarayananandGitHub eada8c9af2 chore: Fix puma http-parser error (#3236)
https://github.com/puma/puma/releases/tag/v5.5.2
2021-10-18 14:23:28 +05:30
Pranav Raj SandGitHub 6de964a0bd fix: HTTP parser error in linux installations (#3232) 2021-10-18 14:20:48 +05:30
lybrusandGitHub 9f9dd09985 chore: .env.example MAILER_SENDER_EMAIL put value in quotes (#3226)
Signed-off-by: Damir Rashidov <damir@rashidov.eu>
2021-10-18 14:15:04 +05:30
Sojan a9849e402e Merge branch 'master' into develop 2021-10-16 00:18:47 +05:30
Sojan a2ffcc4502 Merge branch 'release/1.21.0' into develop 2021-10-16 00:13:23 +05:30
Sojan c831bee0e3 Merge branch 'release/1.21.0' 2021-10-16 00:13:06 +05:30
Sojan JoseandGitHub 3b53ca157c chore: fix the failing user destroy for admin (#3223)
- fix the invitee association on the user
- handle Instagram events with inbox missing
2021-10-16 00:11:53 +05:30
Sojan de0702b679 Bump version to 1.21.0 2021-10-15 14:44:56 +05:30
Muhsin KelothandGitHub cd5c2c51d9 fix: Send notification to all the mentioned users in a private message (#3222) 2021-10-15 14:35:43 +05:30
Sojan JoseandGitHub cebd34053b chore: Use availability in dashboard presence toggle (#3212) 2021-10-15 00:30:48 +05:30
Pranav Raj SandGitHub ed25435ac2 fix: Render inbox icon properly (#3219) 2021-10-14 20:18:43 +05:30
0c65db925d chore: Fixes the missing gem warning (#3207)
* chore: Fixes the missing gem warning

fixes: #3143

* chore: rubocop fixes

Co-authored-by: Tejaswini Chile <tejaswini776@gmail.com>
2021-10-14 13:57:01 +05:30
Sojan JoseandGitHub 590001cca2 chore: New Translation updates (#3214) 2021-10-14 13:32:15 +05:30
Sojan JoseandGitHub e669f6766f chore: Fix Dialogflow issue (#3210) 2021-10-14 13:17:09 +05:30
Pranav Raj SandGitHub 99abbb8158 feat: Display sent status of emails in email channel (#3125) 2021-10-14 12:55:46 +05:30
Muhsin KelothandGitHub 5c30bc3e2b fix: Read message appears on page refresh in the widget (#3175) 2021-10-14 11:51:00 +05:30
Muhsin KelothandGitHub 5799b9fa26 chore: Fix the prop warning issue in contact merge modal (#3211) 2021-10-13 18:58:30 +05:30
Nithin David ThomasandGitHub b33701a666 feat: Create modal to merge two contacts (#2457) 2021-10-13 18:35:13 +05:30
WevrLabsandGitHub 6c3e2a0bd3 feat: Render sticker messages from Telegram (#3204)
Add support for rendering sticker messages thumbs in Telegram.
2021-10-13 17:16:14 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a494afd0e7 chore: Bump puma from 5.4.0 to 5.5.1 (#3208)
Bumps [puma](https://github.com/puma/puma) from 5.4.0 to 5.5.1.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.4.0...v5.5.1)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-13 14:01:06 +05:30
6998e9aa2d fix: Update email message_id parsing order (#3073)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-12 20:46:00 +05:30
Muhsin KelothandGitHub 6bfa551c85 fix: Trigger campaigns only during business hours (#3085)
Fixes #2433
2021-10-12 17:58:33 +05:30
7c21cf2255 feat: Render audio, video and voice attachments in telegram. (#3155)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-12 12:58:30 +05:30
Tejaswini ChileandGitHub 5749d25ff8 feat: Update instagram webhooks URL (#3197) 2021-10-12 12:46:27 +05:30
c1d68cc8ae feat: Show refresh prompt on network disconnect (#3165)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-12 11:57:36 +05:30
Nithin David ThomasandGitHub 5237e51f2c chore: Fixes lint errors in mail component (#3200) 2021-10-12 10:14:09 +05:30
Manoj M JandGitHub 2c8bf00d38 chore: Use connection pooling for Redis
ref: #3199
2021-10-11 19:46:15 +05:30
Murtaza BagwalaandGitHub 3d3f0ff6ee feat: Ability to receive attachments from LINE messenger (#3094)
Add support to add videos, audio, and images from line to chatwoot.

Fixes #3039
2021-10-11 19:06:41 +05:30
2c3e37b157 fix: Disable triggering disabled ongoing campaigns (#3115)
* fixes: Triggering disabled ongoing campaigns.

* Fix the specs

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-10-11 18:18:11 +05:30
Aswin Dev P.SandGitHub a35269d275 chore: Create conversation API should accept assignee & team (#3166) 2021-10-11 15:17:30 +05:30
68e697c379 feat: Support cc and bcc in email replies (#3098)
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-11 13:00:48 +05:30
Sojan JoseandGitHub 0e0632be22 chore: Minor Housekeeping tasks (#3169)
- Limit Rack attack to production environments
- Make the long-running data migration optional
2021-10-08 15:45:45 +05:30
1c4afb10df fix: Open live-chat widget clicking on any unread message (#3153)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-08 14:08:13 +05:30
SanjuandGitHub ec2dc1b61b fix: Update the styles for ol & li - lists in dashboard (#3110) 2021-10-08 13:55:21 +05:30
b9e85a628b Feat : Toggle to enforce user validation in Chatwoots web SDK (#3137)
* If enabled, enforces user validation with identifier_hash

* Fixes the hmac flag payload

* Adds missing i18n label for checkbox

* If enabled, Adds EOF on json file

* If applied, Handles HMAC Disable option

Co-authored-by: Tejaswini Chile <tejaswini776@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2021-10-08 12:53:24 +05:30
Vishnu NarayananandGitHub 5d3cce12d5 fix: Disable rack attack gem in circleCI (#3167) 2021-10-08 12:14:23 +05:30
Sojan JoseandGitHub 8c192559fe chore: Rate limits on widget conversation endpoints (#3162)
- Limit widget conversation creation to 6 per 12 hours
- Enable rack attack by default
2021-10-07 18:06:43 +05:30
Tejaswini ChileandGitHub 700721ea6d fix: Issue when Instagram response body is empty
Fixes #3138
2021-10-07 14:36:54 +05:30
Sojan JoseandGitHub c54aae21ff chore: Move agent availability to Account level (#3074)
- Move agent availability to the account level
2021-10-07 13:21:46 +05:30
1c6a539c0a feat: Add Reports for teams (#3116)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-06 23:53:51 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Sojan Jose
3e99088fe3 chore: Bump url-parse from 1.5.1 to 1.5.3 (#3146)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-10-06 22:16:14 +05:30
ec9903ae82 fix: Add background to inbox channel badges (#3152)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-06 19:34:34 +05:30
Sojan JoseandGitHub 219a8c4bc5 chore: Instagram reconnect fix (#3142) 2021-10-06 16:23:32 +05:30
Nithin David 271ca53c58 fix: Makes thumbnail images fill the wrap 2021-10-06 14:47:44 +05:30
Murtaza BagwalaandGitHub f874925f0e fix: set default content type as text for message (#3060)
Fixes #2974
2021-10-06 00:10:29 +05:30
bd7aeba484 chore: Provider API prototype (#3112)
Enabling Support for Whatsapp via 360Dialog as a prototype for the provider APIs. 

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-05 23:35:06 +05:30
Tejaswini ChileandGitHub 40d0b2faf3 feat: Add Instagram Channel (#2955) 2021-10-05 14:35:32 +05:30
Sivin VargheseandGitHub 30244f79a6 fixes: Reply box goes hidden and emoji input header section is broken. (#3121) 2021-10-03 21:49:44 -07:00
Sojan JoseandGitHub 1d94e65ca8 fix: CSAT reports page failing to load (#3123)
CSAT reports page was failing to load when there is an assigned agent is deleted.
2021-10-01 13:37:52 +05:30
Aswin Dev P.SandGitHub be9a055a3f feat: Ability to send attachments to telegram (#3108)
This feature allows the user to send and delete attachments in the telegram conversation.

Fixes #3037
2021-10-01 01:45:29 +05:30
Siddharth RameshandGitHub e6bcf24864 chore: Add readonly attribute to woot-input component (#3119) 2021-09-30 22:07:20 +05:30
Pranav Raj SandGitHub 1083a24a26 fix: Update Re-rendering behaviour for lists in conversation view (#3117)
* fix: Update Re-rendering behaviour for lists in conversation view

* Remove console.log
2021-09-30 15:11:00 +05:30
a1563917ba feat - Add filter for reports by agent, label and inboxes (#3084)
* Adds filter for agents, labels and inboxes

* Added Inboxes Reports Feature

* Fixed populating of filter dropdown issue

* If applied, fixes code climate style-lint warnings

* Fixes codeclimate warnings

* if applied, Refactors sidebar file to fix codclimate warnings

* if applied, fixes the download reports button for filtered report-data

* If applied, replaces native img tag with thumbnail component

* If applied, replaces hardcoded color string with variable

* If applied, adds a11y labels to multiselect dropdowns

* If applied, Renames reports methods to generic names

* If applied, Adds test cases for Labels and Inboxes

* If applied, write a test spec for fileDownload helper

* if applied, Moves fileDownload method to a utils folder

* If applied, Fixes the report file name type

* Test Spec for Reports Store module

* Fix specs - add restoreAllMocks

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-30 13:13:45 +05:30
Pranav Raj SandGitHub 57abdc4d5f feat: Display "Snoozed Until" time on conversation header (#3028) 2021-09-29 19:33:51 +05:30
Sojan JoseandGitHub 49ac4a4400 chore: Fix Twilio callback url not appearing until refresh (#3106)
The Twilio callback url wasn't being displayed until the page is refreshed

fixes: #3034
2021-09-29 18:29:13 +05:30
Pranav Raj SandGitHub cc244833d0 feat: Add all filter for conversations (#3102) 2021-09-29 16:23:39 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Muhsin Keloth
d55a48037a chore: Bump tmpl from 1.0.4 to 1.0.5 (#3059)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-09-29 13:00:56 +05:30
6f6bb91823 fix: Add meaningful alert error message if file upload fails (#3093)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-09-29 13:00:08 +05:30
a8f6eebd66 bug: Fixes Incorrect badge for Twilio SMS inbox and adds the ability to differentiate Twitter tweets and chats (#3003)
* bug: Fixes Incorrect badge in the thumbnail for Twilio SMS inbox

* Minor fixes

* Minor fixes

* Review fixes

* Minor fixes

* fixes codeclimate error

* Minor fixes

* Minor fixes

* Minor fixes

* Review fixes

* Minor fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-09-29 12:56:45 +05:30
bba2750975 feat: Add ability to bulk import contacts (#3026)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-29 12:01:58 +05:30
6129edce08 fix: dialogflow integration in docker environments (#3072)
* natively compile ruby gems

* add missing compiler tools

* add bundler platform ruby to force native compilation

* fix bundler env in final docker stage

* add comments to DockerFile

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-09-28 20:49:50 +05:30
Sojan JoseandGitHub ed22e7cad4 chore: mitigate CVE-2021-41098 (#3101)
ignoring CVE-2021-41098 as Chatwoot doesn't support JRuby at the moment

fixes: #3097
2021-09-28 19:34:11 +05:30
Aswin Dev P.SandGitHub edd0e2329f feat: Add the ability to close and reopen the chat window via SDK (#3080) 2021-09-28 19:25:44 +05:30
Sivin VargheseandGitHub 1761bec615 feat: Adds ability to edit out webhook URL of API Channel (#3013) 2021-09-28 12:33:08 +05:30
Aswin Dev P.SandGitHub 15aaa8883c feat: API to Filter reports by teams (#3066)
Add API to Filter reports by teams

Fixes: #2916
2021-09-27 21:12:08 +05:30
8b7f6c691a bug: fixes error in creating a new one off campaign (#3067)
* bug: fixes error in creating a new one off campaign

* Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-09-24 08:07:30 -07:00
Akhil G KrishnanandGitHub 1cb2226dbc chore: Remove unused memoization in telegram incoming service (#3075) 2021-09-24 17:22:22 +05:30
Hugo SartiandGitHub 1f4685ae4b fix: offset issue for Business hours on timezones with DST 2021-09-24 00:20:08 +05:30
Tejaswini ChileandGitHub 54bdb2957f feat: Add assignee last seen to conversations (#3069)
- Adds assignee last seen attribute to conversations
2021-09-23 20:59:10 +05:30
Aswin Dev P.SandGitHub 4f51a46c2b feat: Ability to delete a contact (#2984)
This change allows the administrator user to delete a contact and its related data like conversations, contact inboxes, and reports.

Fixes #1929
2021-09-23 12:52:49 +05:30
Muhsin KelothandGitHub 0c24df96a8 chore: Conversation custom attribute APIs (#3024) 2021-09-22 10:46:48 +05:30
Tejaswini ChileandGitHub dddab0bbce chore: Handle the Twilio exception in sentry
Fix trying to extract the Sid from non created message.

Fixes #3029
2021-09-21 23:02:45 +05:30
Murtaza BagwalaandGitHub c504067e2b fix: Add blank check for file param in Import API (#3057) 2021-09-21 10:20:12 +05:30
Pranav Raj SandGitHub b59e73b10b fix: Update associations when a label is updated (#3046) 2021-09-21 10:16:32 +05:30
Sojan JoseandGitHub aaadd61e09 fix: Outbound messages triggering out of office (#3051) 2021-09-21 10:16:14 +05:30
dcbbb09ebd fix: Update widget option button style to handle long text (#3030)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-19 21:12:54 +05:30
Pranav Raj SandGitHub fa2db5a729 fix: Update title for out of office message (#3043) 2021-09-19 20:38:20 +05:30
Tejaswini ChileandGitHub b1b0268705 feat: Support sending and receiving attachments in Slack Integration (#3022)
- Process incoming slack attachments
- Send attachments from chatwoot to slack
2021-09-18 00:49:01 +05:30
Aswin Dev P.SandGitHub 794a56d4cc Feat: Out of office autoresponder (#2992)
This change allows the user to enable autoresponder during the out-of-office time.

Fixes: #2035
2021-09-17 22:17:11 +05:30
Tejaswini ChileandGitHub 6ad5a7452c fix: Emails not delivered when case does not match
Fixes #2504
2021-09-17 22:14:39 +05:30
Sojan JoseandGitHub 0c3e8b6dbd chore: Return medium in inbox APIs (#3025)
Return medium in inbox APIs
2021-09-16 16:51:06 +05:30
Tejaswini ChileandGitHub a0ffefad71 chore: Use the name of the sender from the mail object
if the sender email is Sony Mathew <Sony@chatwoot.com> Contact should be built with Sony Mathew

Fixes #2911
2021-09-16 13:26:52 +05:30
Sojan 799e0ed4f5 Merge branch 'master' into develop 2021-09-15 20:19:34 +05:30
Sojan 928766f07b Merge branch 'release/1.20.0' into develop 2021-09-15 20:19:09 +05:30
Sojan b474e39feb Merge branch 'release/1.20.0' 2021-09-15 20:18:57 +05:30
Pranav Raj SandGitHub 3abcadb5cb fix: Reject keyboard shortcut listeners if input box is active (#3019)
Reject keyboard shortcut listeners if input box is active
2021-09-15 20:15:06 +05:30
Sojan JoseandGitHub a14f4ede87 chore: Sidebar icons for new inboxes (#3016)
- Sidebar icons for line and telegram inboxes
- Sentry fix for contact IP lookup job
2021-09-15 18:12:56 +05:30
Sojan JoseandGitHub 2396b59f11 chore: API fixes (#3014)
- Minor API fixes
- Configuration screen for LINE inbox
2021-09-14 22:44:53 +05:30
Sojan JoseandGitHub 946a09928e Chore: Release Fixes (#3011)
- Fix super admin crashing
- Fix error on telegram group messages

fixes: #2856
2021-09-14 15:54:57 +05:30
Vishnu NarayananandGitHub 2c381d726d chore: Update installation env value for linux script (#3005) 2021-09-14 12:59:22 +05:30
Pranav Raj SandGitHub 11cbc4d952 fix: Revert key changes in it translation files (#3010) 2021-09-14 12:33:13 +05:30
Sojan d76455e840 Bump version to 1.20.0 2021-09-14 12:29:05 +05:30
Pranav Raj SandGitHub aa5d01b572 fix: Hide quoted replies by default from messages (#3009)
Fixes: #2009 , #2365
2021-09-14 11:55:48 +05:30
Sojan JoseandGitHub 22d1c8baf2 Chore: Inbox Members API improvements (#3008)
- New Inbox Member APIs
- Return JSON errors for Platform APIs
2021-09-14 11:55:02 +05:30
ccd0dc39ad chore: Update translations (#3004)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-13 19:19:59 +05:30
Fayaz AhmedandGitHub 84b96526db chore: Upgrade vue router to the 3.x (#2981) 2021-09-13 18:10:56 +05:30
Pranav Raj SandGitHub f2e2a0b7ed chore: Update contact sidebar with accordion (#3002) 2021-09-13 18:08:58 +05:30
Sojan JoseandGitHub 328edd24de chore: Move Facebook event processing to worker (#2988) 2021-09-13 18:05:14 +05:30
26a3150fd8 feat: Adds the ability to edit and delete custom attributes (#2982)
* feat: Adds the ability to edit and delete custom attributes

* Review fixes

* Minor fixes

* Adds specs

* Minor fixes

* Update settings.routes.js

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-09-13 03:26:18 -07:00
Brandon WilsonandGitHub 571fefd7cd fix: Selected agent profile picture in agent multi select (#2949) 2021-09-13 13:43:19 +05:30
Tejaswini ChileandGitHub b74261205d chore: Support for special characters in password
Fixes: #2919
2021-09-13 13:15:05 +05:30
Pranav Raj SandGitHub f79c52b8c3 chore: Update Changelog URL (#3001) 2021-09-13 12:54:26 +05:30
Sojan JoseandGitHub 0a38632f14 feat: Line Channel (#2904)
- Ability to configure line bots as a channel in chatwoot
- Receive a message sent to the line bot in chatwoot
- Ability to reply to line users from chatwoot

fixes: #2738
2021-09-11 01:31:17 +05:30
Sojan JoseandGitHub 671c5c931f feat: Telegram Channel (#2901)
- Ability to configure telegram bots as a channel in chatwoot
- Receive a message sent to the telegram bot in chatwoot
- Ability to reply to telegram users from chatwoot
- Receive attachment messages in chatwoot

fixes: #1843
2021-09-10 00:00:52 +05:30
Sojan JoseandGitHub 9c4ce9af35 chore: Strip unnecessary data from push payload (#2924) 2021-09-09 13:59:42 +05:30
Fayaz AhmedandGitHub 2821777e93 feat: Add multiline support for channel greeting message (#2952) 2021-09-08 15:07:24 +05:30
41314157c2 fix: Revert translated values in CHAT_STATUS_ITEMS (#2977)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-09-08 10:06:18 +05:30
Sivin VargheseandGitHub c80289e661 feat: Add custom attribute table (#2929) 2021-09-08 09:37:58 +05:30
39c4fa111a chore: Update translations (#2965)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-09-07 23:14:58 +05:30
Pranav Raj SandGitHub 4759730022 feat: Configure Chatwoot & Analytics for SaaS app (#2975)
* feat: Add Chatwoot support inside Chatwoot SaaS
* Fix identity issues with Chatwoot
2021-09-07 23:11:01 +05:30
Sojan JoseandGitHub 8de4ce0037 chore: attachment validation fix (#2976)
- Attachment validation was supposed to affect the web widget channel only. But it was validating for all channels
2021-09-07 22:59:02 +05:30
NoocandGitHub 7245e66b31 Mount local storage to host in docker-compose.production.yaml (#2953) 2021-09-07 19:52:14 +05:30
Tejaswini ChileandGitHub 772d4ae726 feat: Send MMS through Twilio Inbox (#2959)
Send MMS message to customer for Twilio integration inbox.

Fixes #2311
2021-09-07 00:05:14 +05:30
Pranav Raj SandGitHub 118c1458ab fix: Remove duplicate emit event (#2969) 2021-09-06 15:13:51 +05:30
Pranav Raj SandGitHub dace97b7b0 feat: Update design - CSAT survey page (#2964) 2021-09-06 11:42:02 +05:30
Pranav Raj SandGitHub 7b77bab18e fix: Update actions position if avatar image is unavailable (#2963) 2021-09-06 01:14:17 +05:30
7fc575a474 feat: Use accordion in conversation sidepanel (#2839)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-06 00:19:09 +05:30
Sojan JoseandGitHub 9acac38635 chore: Update translations (#2958) 2021-09-05 19:12:18 +05:30
Sojan JoseandGitHub 2ebd38c3b7 Chore: API Improvements (#2956)
- API to fetch info of a single inbox
- Document passing custom_attributes in the API
- Ability to filter contacts with contact identifier in search API
2021-09-04 17:56:46 +05:30
Sojan JoseandGitHub b866c54ad5 chore: Bring updated translations (#2945) 2021-09-03 15:48:24 +05:30
Muhsin KelothandGitHub ff1625708e fix: Subscription attribute update issue (#2951) 2021-09-03 13:45:14 +05:30
SanjuandGitHub a03ed4eea0 feat: Update agent report filename to use generated date (#2934) 2021-09-03 11:58:26 +05:30
Sojan JoseandGitHub ad83d1bb71 feat: Platform API improvements (#2900)
- Platform APIs to add and update custom attributes to users
- Platform APIs to delete accounts
- Platform APIs to delete users
2021-09-02 18:29:45 +05:30
Nithin David ThomasandGitHub a60a33679f fix: Fixes messages jumping issue for newly created message (#2935)
* fix: Fixes messages jumping issue for newly created message

* Fixes border radius issue of messages

* Fixes bottom jumping issue

* Fixes code climate issue
2021-09-02 16:26:20 +05:30
af1d8c0ee5 feat: Fixes #1940 WCAG support for website widget (#2071)
Co-authored-by: Kaj Oudshoorn <kaj@milvum.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-09-02 12:13:53 +05:30
2ddd508aee Add missing conversation id for first response event (#2922)
- Add missing conversation id for first response event
- Fixing the flaky test

Fixes #2746

Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
2021-09-02 00:16:09 +05:30
8b841596a5 feat: Creates pop out reply box (#2832)
* enhancement: Creates draggable pop out replay box

* Review fixes

* Minor fixes

* codeclimate fixes

* Update z-index.scss

* Minor fixes

* Review fixes

* Minor fixes

* Update MessagesView.vue

* Review fixes

* Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-01 06:42:22 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
afdf1c70c1 chore: Bump tar from 6.1.3 to 6.1.11 (#2936)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.3 to 6.1.11.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.3...v6.1.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-01 18:13:41 +05:30
Sojan JoseandGitHub 6fdd4a2996 chore: Security Improvements to the API (#2893)
- Devise auth tokens are reset on password update
- Avatar attachment file type is limited to jpeg,gif and png
- Avatar attachment file size is limited to 15 mb
- Widget Message attachments are limited to types ['image/png', 'image/jpeg', 'image/gif', 'image/bmp', 'image/tiff', 'application/pdf', 'audio/mpeg', 'video/mp4', 'audio/ogg', 'text/csv']
- Widget Message attachments are limited to 40Mb size limit.
2021-09-01 15:08:05 +05:30
Muhsin KelothandGitHub 06d8916341 fix: Handle more rest client exceptions (#2930) 2021-08-31 19:45:11 +05:30
Aswin Dev P.SandGitHub 6563cccf34 Add attachment button for email conversation (#2927) 2021-08-31 19:06:12 +05:30
5319af3dfc chore: Merge contact copy over information (#2812)
fixes: #2767, #2773

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2021-08-31 15:30:18 +05:30
1ff9939a80 feat: Ability to remove inbox avatar (#2885)
* Delete inbox avatar

1) New API endpoint added for deleting inbox avatar.
2) Delete avatar button in the inbox settings page.

Co-authored-by: Sojan Jose <sojan@pepalo.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-31 15:12:05 +05:30
Sivin VargheseandGitHub fdcc322660 feat: Add the ability to create custom attribute (#2903) 2021-08-31 13:54:34 +05:30
Pranav Raj SandGitHub 75329e5de1 fix: Add missing referer & initiated_at.timestamp to events (#2920) 2021-08-31 11:46:15 +05:30
Pranav Raj SandGitHub 588f49cc34 fix: Update param name for attachments (#2921) 2021-08-31 11:27:40 +05:30
Tejaswini ChileandGitHub 65f3e83afd feat: APIs to filter reports (#2889)
Fixes #2823
2021-08-27 22:46:32 +05:30
Brandon WilsonandGitHub f94abaef5f feat: Shows inbox identifier token for API inbox (#2894)
Fixes: #2605
2021-08-27 19:56:45 +05:30
Aswin Dev P.SandGitHub 9a8cbee470 chore: Display email channel configuration while editing (#2896) 2021-08-27 19:15:54 +05:30
Nithin David ThomasandGitHub 78646b44b8 fix: Fixes widget holder blocking page clicks (#2897) 2021-08-27 13:10:21 +05:30
0a08e1ffc0 feat: Adds async and defer attributes to chatwoot script tag (#2890)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-08-26 19:51:10 +05:30
Muhsin KelothandGitHub 5853531d9a fix: Disable attribute route from settings menu (#2891) 2021-08-26 18:51:59 +05:30
Sivin VargheseandGitHub d13c4ff8c5 feat: Keyboard shortcuts improvements (#2790) 2021-08-26 15:55:58 +05:30
Tejaswini ChileandGitHub 69b0434bb7 chore: Display available name in email (#2888) 2021-08-26 15:16:47 +05:30
1d5150e3a7 feat: Update activity message, email designs in Message bubble (#2886)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-08-26 11:58:56 +05:30
Muhsin KelothandGitHub 7dd42f3fd7 chore: Add description in custom attributes CRUD API response (#2875) 2021-08-26 01:10:45 +05:30
Sivin VargheseandGitHub 4a23a393f7 feat: Creates custom attributes route (#2877) 2021-08-25 20:30:34 +05:30
Vishnu NarayananandGitHub 8d6b3efa2e fix: chatwoot_webpack failure due to missing git (#2878) 2021-08-25 14:51:35 +05:30
Muhsin KelothandGitHub a27ccc5866 fix: Disable "none" option from team dropdown If team is not selected (#2876) 2021-08-25 14:11:16 +05:30
Sojan JoseandGitHub a9ca76d9df chore: support for APMs (#2874)
Add the support for Newrelic and Datadog.
ref: https://www.chatwoot.com/docs/self-hosted/monitoring/apm-and-error-monitoring

fixes: #2861
2021-08-25 01:04:29 +05:30
Tejaswini ChileandGitHub 21e8a41206 fix: Update styles in email template for mention notifications (#2871) 2021-08-24 22:42:48 +05:30
Muhsin KelothandGitHub 1257f86f22 chore: Add description field in custom attribute model (#2872) 2021-08-24 21:17:23 +05:30
Tejaswini ChileandGitHub 09e3413d10 chore: consider X-original-sender to create contact in case of group mail (#2841)
For emails forwarded from google groups, Google rewrites the FROM address to the group email and the original email will be available under X-Original-Sender. This PR enables chatwoot to handle this case.

Fixes: #2715
2021-08-24 14:18:08 +05:30
Muhsin KelothandGitHub 6515b69560 feat: CSAT for all channels (#2749) 2021-08-23 22:00:47 +05:30
5debe9e8ee fix: Add agent typing notification on all channels (#2855)
Fixes CVE-2021-22881

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-08-23 21:34:23 +05:30
Vishnu NarayananandGitHub 7cd3cef0a2 chore: add uptime and response time badges (#2842) 2021-08-20 21:28:16 +05:30
Tejaswini ChileandGitHub eb80324eaa feat: Add message content to mention email template (#2838) 2021-08-18 15:28:45 +05:30
Sojan 20b96c7c60 Merge branch 'release/1.19.0' 2021-08-17 01:50:25 +05:30
Sojan 6a9c885926 Bump version to 1.19.0 2021-08-17 01:48:46 +05:30
Pranav Raj SandGitHub ed317c5bb3 feat: Use relay server for self-hosted mobile push notifications (#2757) 2021-08-17 01:44:16 +05:30
Vishnu NarayananandGitHub 319412f6dc feat: include installation method in data to cw hub (#2831) 2021-08-16 23:35:00 +05:30
Sivin VargheseandGitHub 0e4196c91a enhancement: Removes the focus of the first item in the dropdown when it is active. (#2833) 2021-08-16 22:11:20 +05:30
Nithin David ThomasandGitHub 70d41ffcdd fix: Smoothens out opening animation for widget (#2789) 2021-08-14 08:40:29 +05:30
Nithin David ThomasandGitHub e09941db1c fix: Use all: revert to avoid external css styles for widget bubble (#2809) 2021-08-13 20:16:33 +05:30
Pascal JuferandGitHub 37bf4b7dd8 fix: Use label for "Subscribe to updates" checkbox (#2788) 2021-08-13 19:10:47 +05:30
Aswin Dev P.SandGitHub 9e052fd5b2 chore: Set phone_number through Website SDK (#2803)
Fixes: #2599
2021-08-13 17:26:09 +05:30
dfcc33cbdd fix: Fixes error when dropdown button is focused (#2797)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-13 13:40:12 +05:30
0f148f7700 fix: Fixes parsing issue with custom attributes (#2796)
* fix: Fixes parsing issue with custom attributes

* Update app/javascript/dashboard/routes/dashboard/conversation/ContactCustomAttributes.vue

Co-authored-by: शैलेश कळमकर (Shailesh Kalamkar) <shailesh.kalamkar@gmail.com>

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: शैलेश कळमकर (Shailesh Kalamkar) <shailesh.kalamkar@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-08-13 13:37:51 +05:30
Sojan JoseandGitHub acb39cbc8f chore: Ability to create contact with identifiers (#2802) 2021-08-13 13:02:46 +05:30
Nithin David ThomasandGitHub d492a65c24 fix: Checks JS window object for null before focusing (#2798) 2021-08-12 23:21:31 +05:30
3d807684bb fix: Reduce size of Docker image (#2779)
* fix: Ordering in Dockerfile

Folders node_modules & tmp/cache are currently not removed and thus the Docker image
size is pretty big.

I don't think we can remove app/assets & vendor/assets though as the
app won't work without those.

* Expose port 3000 in Docker image
* Further Dockerfile optimization

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2021-08-12 15:10:02 +05:30
21d2b4d918 chore: Consider inbox.timezone in open_at logic (#2183)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-08-12 02:29:15 +05:30
Sojan JoseandGitHub 1f59205f20 chore: handle more exceptions (#2793) 2021-08-12 01:32:22 +05:30
a065165bcb fix: undefined method contact in support mailbox (#2678)
if chatwoot receives an email of already existing contact with a different case say "Care@example.com", before this fix, it will throw an error. Now it will retrieve existing contact

Fixes: #2553


Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-08-12 01:28:07 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4907489ea8 chore: Bump path-parse from 1.0.6 to 1.0.7 (#2786)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-12 00:28:14 +05:30
Muhsin KelothandGitHub 4d668d8db3 feat: Dedicated tab for campaigns (#2741) 2021-08-11 20:29:33 +05:30
Sojan JoseandGitHub 8daf1fe033 chore: Add down gem for Local file downloads (#2765)
- Add down gem to handle downloading files to host machine
- Remove the LocalResource class
- Introduce max limit for contact avatars send via SDK
2021-08-11 16:40:28 +05:30
29f54c1f26 chore: Removed the multi-select agent dropdown from the conversation header. (#2781)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-08-10 23:25:55 -07:00
1a4faab381 feat: Creates story for cc bcc input component in reply box (#2763)
* feat: Creates cc bcc input component for reply box

* Adds email inputs for cc and bcc

* Cleans storybook code

* Fixes eslint issues

* Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>

* Review fixes

* Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>

* Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>

* Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-11 11:34:47 +05:30
c3314dd186 feat: Creates a modal showing all the available keyboard shortcuts (#2728)
* feat: Adds modal showing all the available keyboard shortcuts

* Minor fixes

* Minor fixes

* Spacing fixes

* fix translations

* Adds i18n

* Review fixes

* Review fixes

* spacing fixes

* Review fixes

* Minor fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-09 21:23:40 -07:00
Pranav Raj SandGitHub bdc4ecffc1 fix: Save content_type, multipart information to email message model (#2774) 2021-08-09 18:04:34 +05:30
Nithin David ThomasandGitHub 462214aced fix: Reduces space for custom drop-downs (#2778) 2021-08-09 15:12:11 +05:30
c523a953f7 feat: Adds keyboard shortcuts for conversation actions (#2672)
* feat: Adds keyboard shortcuts for conversation actions

* Minor fixes

* Minor fixes

* Minor fixes and add new shortcut

* MInor fixes

* Review fixes

* Minor fixes

* Code cleanup

* Minor fixes

* Uses Alt or Option key instead of shift-key

* Review fixes

* Review fixes

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-09 00:38:52 -07:00
Sivin VargheseandGitHub c7482696d4 fix: Remove text retained in confirm delete modal (#2775) 2021-08-09 12:07:42 +05:30
2035d24cb8 enhancement: Show close button for unread view (#2758)
* enhancement: Show close button for unread view

* Fixes issue with button spacing

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-07 11:56:40 +05:30
9c257578b0 fix: Fixes unread view blocking page scroll (#2727)
* fix: Fixes unread view blocking page scroll

* Update sdk.js

* Fixes the height issue for unread view

* Fix unread message position issue

* Code climate fixes

* Fixes height issue for large messages

* Fixes height issue on unread view

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-07 11:56:15 +05:30
Vishnu NarayananandGitHub b58ca21f0b docs: Update README to add question/support sub-section (#2764)
- add questions sub-section and mention discord
- improve formatting
2021-08-07 00:44:07 +05:30
Sojan JoseandGitHub edec74c389 chore: Fix Twilio send message error (#2761) 2021-08-06 13:34:20 +05:30
f934a5eb04 fix: Broken Docker Builds (#2755)
Co-authored-by: Pascal Jufer <paescuj@users.noreply.github.com>
2021-08-06 01:21:44 +05:30
RaikasandGitHub f477c5281f chore: Fix Finnish translations (#2753) 2021-08-05 10:24:07 +05:30
Muhsin KelothandGitHub 6265c1c907 fix: Add brand color in CSAT card component (#2756) 2021-08-05 01:20:01 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e834b545ef chore: Bump tar from 6.1.0 to 6.1.3 (#2750)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.3.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.3)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-04 10:23:13 +05:30
Pascal JuferandGitHub c37966744f fix: Fix and rename pg_database_url.sh helper script (#2747)
- Fix and rename pg_database_url helper script
- Use single-quote and remove trailing whitespace
2021-08-03 22:56:55 +05:30
Sojan JoseandGitHub ab54d9c629 chore: Upgrade rails and ruby versions (#2400)
ruby version: 3.0.2
rails version: 6.1.4
2021-08-03 20:11:52 +05:30
Sivin VargheseandGitHub 7e960b7c72 feat: Add support for rich content for message in ongoing campaigns (#2577) 2021-08-03 19:38:51 +05:30
Muhsin KelothandGitHub 92c14fa87d feat: CSAT response collection public page (#2685) 2021-08-03 18:22:50 +05:30
Vishnu NarayananandGitHub 9b01b82cc7 docs: update chatwoot VDP guidelines (#2740) 2021-08-03 16:13:44 +05:30
Nithin David ThomasandGitHub 0475060245 enhancement: Updates icons to show last message type (#2743) 2021-08-03 12:13:24 +05:30
Pranav Raj SandGitHub faf104c1fe fix: Update tweet character count logic (#2709) 2021-08-02 16:07:30 +05:30
Pranav Raj SandGitHub d88e3e3596 fix: Resolve conversation with id instead of current conversation (#2731) 2021-08-02 13:11:07 +05:30
Muhsin KelothandGitHub 9f3f238cb5 chore: Show new account modal if user accounts are empty (#2448) 2021-08-02 08:54:53 +05:30
Pranav Raj SandGitHub 5b3339cd33 fix: Render line-breaks properly in messages (#2699) 2021-08-02 08:24:08 +05:30
Pranav Raj SandGitHub bfa00cc12d fix: Avoid flicker while updating the view with new messages (#2730) 2021-08-02 08:03:12 +05:30
Sojan JoseandGitHub e46aa1aa64 chore: Mark Facebook accounts for reconnection (#2405)
fixes: #2037
2021-08-01 18:15:39 +05:30
Sojan JoseandGitHub 2890339734 chore: Limit objects returned by conversation API (#2721) 2021-07-31 21:19:42 +05:30
Pranav Raj SandGitHub 915366c472 fix: Rename identity_hash to identifier_hash (#2726) 2021-07-29 20:11:21 +05:30
f2b5e328bb feat: Update agent and team multi-select with new multi-select dropdown (#2516)
* feat: Update agent/team multiselect styles

* Component name fixes

* Adds key control for our multiselect dropdown and component name spell fix

* Minor fixes

* Review fixes

* Minor fixes

* Minor fixes

* Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-07-29 17:44:37 +05:30
Nithin David ThomasandGitHub 672e5874fb fix: Appending markdown as HTML into editor (#2720) 2021-07-29 11:53:28 +05:30
Nithin David ThomasandGitHub 8f30abb98b feat: Show links for custom attributes (#2723) 2021-07-28 21:36:35 +05:30
223385d134 fix: Specify external db with non-standard port (#2711)
POSTGRES_PORT was not taking effect if provided separately
instead of using DATABASE_URL. This adds support for using
databases running on non-standard ports.

#1145
#1147

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-28 19:36:51 +05:30
Muhsin KelothandGitHub 7662fdce47 feat: CSAT response public APIs (#2670) 2021-07-28 14:59:13 +05:30
a47ca9cf4b feat: Show e-mail meta data for conversations (#2708)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-28 14:43:44 +05:30
b44f9b792b chore: Block & throttle abusive requests (#2706)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-27 21:27:23 +05:30
SanjuandGitHub 359c3c8ccb Fix: type error trim of undefined#2595 (#2702) 2021-07-27 07:38:27 +05:30
sbreiler-workandGitHub d7da6fbfb5 fix: Make "Search Results" in PopOverSearch translateable (#2705) 2021-07-26 14:33:42 +05:30
Pranav Raj SandGitHub 7664006625 chore: Improve search, list performance of contact/conversation APIs (#2696) 2021-07-23 18:39:24 +05:30
Pranav Raj SandGitHub 6e1493501a feat: Add APIs for custom attribute definitions (#2689) 2021-07-23 17:04:33 +05:30
SanjuandGitHub 7e0937f3ed chore: Cypress test case for create label flow 2021-07-23 16:38:44 +05:30
d955d8e7dc feat: Ability to snooze conversations (#2682)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-23 15:24:07 +05:30
Vishnu NarayananandGitHub 4d45ac3bfc chore: Switch from addgroup to adduser (#2688) 2021-07-22 19:49:12 +05:30
ecdf977de7 Live chat widget preview #2441 (#2523)
* update widget preview on storybook

* removed default value for logo

* add online dot

* resolve PR comments

- split widget to head, body & footer
- updated reply time to a select box

* update spacing with variables

* update reply-time with i18

* update with spacing variables

* update padding with space variable

* resolved PR comments

* update background color

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-07-22 18:36:33 +05:30
Muhsin KelothandGitHub 6b6df7a70d fix: Disable "none" option from agent dropdown If agent is not selected (#2687) 2021-07-22 16:31:53 +05:30
Sojan JoseandGitHub a7ca55c080 chore: Change the conversation bot status to pending (#2677)
fixes: #2649
2021-07-21 22:02:43 +05:30
Sojan JoseandGitHub a0886d37bc chore: Expose widget config via an API (#2645)
Expose widget config via an API so that the UI could be detached from the rails Application.
2021-07-21 01:26:32 +05:30
Sojan caf8669db5 Merge branch 'release/1.18.1' 2021-07-20 00:51:08 +05:30
Sojan d1619bdc87 Bump version to 1.18.1 2021-07-20 00:50:38 +05:30
Sojan JoseandGitHub 217dd8a6f0 chore: Add assigned_count to conversation APIs (#2665) 2021-07-19 19:10:58 +05:30
Pranav Raj SandGitHub a235e82a02 fix: Update attribute name to conversationsCount (#2662) 2021-07-19 14:41:16 +05:30
Pranav Raj SandGitHub a2fca2edb8 fix: Fix HTML only email rendering (#2644) 2021-07-16 19:56:54 +05:30
Sojan 9de36f2b9e Merge branch 'release/1.18.0' 2021-07-16 00:08:30 +05:30
Sojan fa3cc40059 Bump version to 1.18.0 2021-07-16 00:07:18 +05:30
Sojan JoseandGitHub 3941c6f32b chore: Translation updates (#2639) 2021-07-16 00:04:09 +05:30
Sojan JoseandGitHub eda52930be chore: Add Telemetry (#2631)
ref: https://www.chatwoot.com/docs/self-hosted/telemetry
2021-07-15 23:58:54 +05:30
Pranav Raj SandGitHub 5aac2acf56 fix: Improve mail content parsing (#2638) 2021-07-15 22:50:32 +05:30
Muhsin KelothandGitHub 85ea56b765 fix: Disable sender tooltip and copy button in deleted messages (#2637) 2021-07-15 21:06:54 +05:30
Pranav Raj S 72069e45ef fix: Use mail.decoded as fallback for text content to fix char-rendering 2021-07-15 20:06:43 +05:30
Mrunal SelokarandGitHub e0535168a0 chore: Removing duplicate callback to create auth token (#2624)
Removed after create callback in user model to create a new access token. This is already being taken care of by AccessTokenable module.

Fixes #2620
2021-07-15 15:24:38 +05:30
Muhsin KelothandGitHub b56512eb56 fix: Hide deleted messages on widget side (#2614) 2021-07-15 14:27:37 +05:30
Muhsin KelothandGitHub cf785123a5 feat: One off campaign UI (#2621) 2021-07-15 13:31:43 +05:30
Pranav Raj SandGitHub aa7db90cd2 fix: Use Dompurify to strip style characters (#2632) 2021-07-15 12:54:31 +05:30
Sojan JoseandGitHub d7982a6ffd chore: Add assigned option to conversation finder API (#2630)
- Adds the ability to filter all the conversations which are assigned
- Add rack timeout gem
- Remove size attribute from Sidekiq config
2021-07-14 22:51:27 +05:30
Pranav Raj SandGitHub 3d18ec9e40 feat: Add date-range filter on CSAT Reports (#2622) 2021-07-14 20:15:57 +05:30
Sojan JoseandGitHub a5bc81b304 chore: Suppress the unnecessary CSRF warning (#2606)
Suppress the unnecessary CSRF warning
2021-07-14 18:40:24 +05:30
Sojan JoseandGitHub dfddf9cacc chore: one off SMS campaign APIs (#2589) 2021-07-14 12:24:09 +05:30
Pranav Raj SandGitHub cb44eb2964 feat: Add CSAT reports (#2608) 2021-07-14 10:20:06 +05:30
Pranav Raj SandGitHub b7806fc210 fix: Update styles to fix the image resolution on smaller devices (#2618) 2021-07-13 18:54:33 +05:30
f9b55944ad feat: Adds custom date range component for reports (#2602)
* feat: Adds custom date range for reports

* Review fixes

* Minor fixes

* Review fixes

* Use computed property

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-13 03:41:03 -07:00
dependabot[bot]andGitHub fae8466a6c chore: Bump addressable from 2.7.0 to 2.8.0 (#2610) 2021-07-13 13:58:54 +05:30
Nithin David ThomasandGitHub deb4513584 bug: Fixes alignment issue with deleted messages (#2613) 2021-07-13 12:00:29 +05:30
Muhsin KelothandGitHub 15085cfb98 feat: Conversation transcript in widget (#2549) 2021-07-13 11:31:21 +05:30
Siddharth RameshandGitHub fc4ef1595b chore: Twilio to individual(SMS/Whatsapp) channels (#2566) 2021-07-12 22:33:39 +05:30
Muhsin KelothandGitHub ba547b3f60 chore: Delete related notifications if a conversation is deleted (#2592) 2021-07-12 12:28:16 +05:30
Pranav Raj SandGitHub 5726447e47 fix: Unescape Slack incoming messages (#2604) 2021-07-09 17:45:02 +05:30
a9ccded62b feat: Creates custom date range picker component (#2597)
* feat: Adds custom date range in reports

* error fixes

* Creates new component for date range and adds stories

* Revert files

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-07-09 14:16:55 +05:30
Muhsin KelothandGitHub 64e69a85f8 chore: Update availability status everywhere if the user changes the status from the account menu (#2581)
* add agent mixin

* apply agent mixin in components

* review fixes

* fix specs
2021-07-09 13:20:54 +05:30
Muhsin KelothandGitHub 4a2195aeda chore: Disable delete option for deleted messages (#2600)
* disable delete option for deleted message

* review fixes
2021-07-09 12:34:09 +05:30
Nithin David ThomasandGitHub efd6f735dc fix: Align delete message menu on twitter bubble correctly (#2591)
* fix: Aligns delete message menu on twitter bubble correctly

* Fixes alignment issues
2021-07-09 10:53:28 +05:30
38cce3c1c0 chore: New translation updates (#2585)
* New translations contact.json (Vietnamese)

* New translations conversation.json (Vietnamese)

* New translations inboxMgmt.json (Vietnamese)

* New translations settings.json (Vietnamese)

* New translations en.json (Vietnamese)

* New translations inboxMgmt.json (Chinese Traditional)

* New translations contact.json (Chinese Traditional)

* New translations conversation.json (Chinese Traditional)

* New translations settings.json (Chinese Traditional)

* New translations en.json (Chinese Traditional)

* New translations en.yml (Chinese Simplified)

* New translations settings.json (Indonesian)

* New translations en.json (Indonesian)

* New translations contact.json (Persian)

* New translations conversation.json (Persian)

* New translations inboxMgmt.json (Persian)

* New translations inboxMgmt.json (Indonesian)

* New translations contact.json (Portuguese, Brazilian)

* New translations conversation.json (Portuguese, Brazilian)

* New translations inboxMgmt.json (Portuguese, Brazilian)

* New translations integrations.json (Portuguese, Brazilian)

* New translations settings.json (Portuguese, Brazilian)

* New translations en.json (Portuguese, Brazilian)

* New translations contact.json (Indonesian)

* New translations conversation.json (Indonesian)

* New translations en.json (Chinese Simplified)

* New translations devise.en.yml (Chinese Simplified)

* New translations inboxMgmt.json (Swedish)

* New translations settings.json (Swedish)

* New translations conversation.json (Swedish)

* New translations en.json (Swedish)

* New translations contact.json (Turkish)

* New translations conversation.json (Turkish)

* New translations contact.json (Swedish)

* New translations conversation.json (Slovak)

* New translations inboxMgmt.json (Slovak)

* New translations settings.json (Slovak)

* New translations en.json (Slovak)

* New translations inboxMgmt.json (Turkish)

* New translations en.json (Ukrainian)

* New translations contact.json (Chinese Simplified)

* New translations settings.json (Ukrainian)

* New translations conversation.json (Chinese Simplified)

* New translations inboxMgmt.json (Chinese Simplified)

* New translations settings.json (Chinese Simplified)

* New translations settings.json (Turkish)

* New translations en.json (Turkish)

* New translations contact.json (Ukrainian)

* New translations conversation.json (Ukrainian)

* New translations inboxMgmt.json (Ukrainian)

* New translations settings.json (Persian)

* New translations integrationApps.json (French)

* New translations en.json (Hebrew)

* New translations contact.json (Hebrew)

* New translations en.json (Nepali)

* New translations conversation.json (Hebrew)

* New translations inboxMgmt.json (Hebrew)

* New translations settings.json (Hebrew)

* New translations settings.json (Nepali)

* New translations csatMgmt.json (French)

* New translations contact.json (Thai)

* New translations conversation.json (Thai)

* New translations inboxMgmt.json (Thai)

* New translations settings.json (Thai)

* New translations en.json (Thai)

* New translations en.json (Tamil)

* New translations contact.json (Tamil)

* New translations en.json (Persian)

* New translations conversation.json (Tamil)

* New translations inboxMgmt.json (Tamil)

* New translations settings.json (Tamil)

* New translations settings.json (Malayalam)

* New translations en.json (Malayalam)

* New translations contact.json (Nepali)

* New translations conversation.json (Nepali)

* New translations inboxMgmt.json (Nepali)

* New translations inboxMgmt.json (Malayalam)

* New translations contact.json (Hindi)

* New translations conversation.json (Hindi)

* New translations inboxMgmt.json (Hindi)

* New translations settings.json (Hindi)

* New translations en.json (Hindi)

* New translations contact.json (Malayalam)

* New translations conversation.json (Malayalam)

* New translations contact.json (Slovak)

* New translations contact.json (Danish)

* New translations conversation.json (Danish)

* New translations inboxMgmt.json (Danish)

* New translations settings.json (Danish)

* New translations en.json (Danish)

* New translations inboxMgmt.json (Czech)

* New translations contact.json (Czech)

* New translations conversation.json (Czech)

* New translations settings.json (Czech)

* New translations en.json (Czech)

* New translations contact.json (German)

* New translations settings.json (Greek)

* New translations en.json (Greek)

* New translations contact.json (Finnish)

* New translations conversation.json (Finnish)

* New translations inboxMgmt.json (Finnish)

* New translations inboxMgmt.json (Greek)

* New translations conversation.json (German)

* New translations inboxMgmt.json (German)

* New translations integrations.json (German)

* New translations settings.json (German)

* New translations en.yml (German)

* New translations en.json (German)

* New translations contact.json (Greek)

* New translations conversation.json (Greek)

* New translations en.json (Catalan)

* New translations inboxMgmt.json (French)

* New translations integrations.json (French)

* New translations report.json (French)

* New translations settings.json (French)

* New translations en.yml (French)

* New translations conversation.json (French)

* New translations en.json (French)

* New translations labelsMgmt.json (French)

* New translations teamsSettings.json (French)

* New translations campaign.json (French)

* New translations contact.json (Spanish)

* New translations conversation.json (Spanish)

* New translations contact.json (French)

* New translations contact.json (Romanian)

* New translations conversation.json (Romanian)

* New translations inboxMgmt.json (Romanian)

* New translations settings.json (Romanian)

* New translations chatlist.json (French)

* New translations en.json (Romanian)

* New translations inboxMgmt.json (Spanish)

* New translations en.json (Arabic)

* New translations contact.json (Catalan)

* New translations settings.json (Arabic)

* New translations conversation.json (Catalan)

* New translations inboxMgmt.json (Catalan)

* New translations settings.json (Catalan)

* New translations settings.json (Spanish)

* New translations en.json (Spanish)

* New translations contact.json (Arabic)

* New translations conversation.json (Arabic)

* New translations inboxMgmt.json (Arabic)

* New translations settings.json (Norwegian)

* New translations en.json (Norwegian)

* New translations contact.json (Polish)

* New translations conversation.json (Polish)

* New translations inboxMgmt.json (Polish)

* New translations inboxMgmt.json (Norwegian)

* New translations conversation.json (Dutch)

* New translations inboxMgmt.json (Dutch)

* New translations settings.json (Dutch)

* New translations en.json (Dutch)

* New translations contact.json (Norwegian)

* New translations conversation.json (Norwegian)

* New translations settings.json (Finnish)

* New translations contact.json (Russian)

* New translations conversation.json (Russian)

* New translations inboxMgmt.json (Russian)

* New translations settings.json (Russian)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations settings.json (Polish)

* New translations en.json (Polish)

* New translations contact.json (Portuguese)

* New translations conversation.json (Portuguese)

* New translations inboxMgmt.json (Portuguese)

* New translations settings.json (Portuguese)

* New translations contact.json (Dutch)

* New translations en.json (Hungarian)

* New translations contact.json (Italian)

* New translations conversation.json (Italian)

* New translations inboxMgmt.json (Italian)

* New translations settings.json (Italian)

* New translations en.json (Italian)

* New translations en.json (Finnish)

* New translations contact.json (Hungarian)

* New translations conversation.json (Hungarian)

* New translations inboxMgmt.json (Hungarian)

* New translations settings.json (Hungarian)

* New translations contact.json (Korean)

* New translations conversation.json (Korean)

* New translations inboxMgmt.json (Korean)

* New translations settings.json (Korean)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations contact.json (Japanese)

* New translations conversation.json (Japanese)

* New translations inboxMgmt.json (Japanese)

* New translations settings.json (Japanese)

* New translations en.yml (Portuguese, Brazilian)

* chore: revert key name

* Update zh_CN.yml

* New translations contact.json (Russian)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-07-07 21:25:04 +05:30
e89e184d3b chore: Add loader for email and csat submit buttons (#2569)
* fix the loader issue in submit button

* review fixes

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-07-07 11:24:08 +05:30
Pranav Raj SandGitHub 0d02142925 feat: Support messages along with the actions in Dialogflow response (#2579) 2021-07-07 10:04:48 +05:30
Sojan JoseandGitHub bbc47971d7 chore: Reduce steps to spin up Codespaces (#2576) 2021-07-06 21:21:40 +05:30
104ae8de2e feat: Create component to merge contacts (#2412)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-06 13:02:37 +05:30
Sojan JoseandGitHub e11b3c4f17 chore: Expose contact custom attributes in events (#2562)
Expose contact custom attributes in events so the external system can behave accordingly without triggering an additional API call.
2021-07-05 14:35:53 +05:30
0bd48129b9 feat: Add settings for audio alert notifications (#2415)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-05 12:01:54 +05:30
Muhsin KelothandGitHub 48127e00d7 feat: Enable/disable CSAT in web widget settings (#2531) 2021-07-05 11:07:02 +05:30
Sivin VargheseandGitHub abda86f9a7 bug: fixes typing indicator out of position in widget (#2551)
Fixes typing indicator out of position in the widget when the agent did not send the last message.
2021-07-02 15:28:32 +05:30
Muhsin KelothandGitHub 8341a43143 chore: Update CSAT submit action behaviour (#2556)
* update behaviour of CSAT submit

* code cleanup
2021-07-02 14:52:20 +05:30
f0f66c7da6 feat: Add ability to create a new conversation if the previous conversation is resolved (#2512)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-30 21:09:44 +05:30
Sivin VargheseandGitHub e6e9916fdb feat: Add drag and drop for images/files in the agent input box (#2546) 2021-06-30 20:32:17 +05:30
dd9d5e410c feat: Add CSAT response APIs (#2503)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-29 20:59:41 +05:30
Nithin David ThomasandGitHub 2e71006f9d feat: Add option to delete message content (#2532) 2021-06-29 20:06:40 +05:30
Pranav Raj SandGitHub 30832d8a34 feat: Add APIs to create custom views on the dashboard (#2498) 2021-06-29 19:29:57 +05:30
Sojan JoseandGitHub fa37f8e185 chore: Support Github Codespaces (#2510)
Note: Update the ruby version 2.7.3. For production Linux VM, install 2.7.3 and follow the upgrade steps as shown in https://www.chatwoot.com/docs/self-hosted/deployment/linux-vm#upgrading-to-a-newer-version-of-chatwoot
2021-06-29 19:18:10 +05:30
07a422219a chore: New translation updates (#2533)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-06-29 18:12:33 +05:30
Muhsin KelothandGitHub 8027c69c1c chore: Change the notification text for mention notification type (#2534) 2021-06-29 14:32:57 +05:30
Nithin David ThomasandGitHub 044b6872a4 feat: Add actions and API for deleting message via API (#2519) 2021-06-29 11:19:08 +05:30
Pranav Raj SandGitHub b705eb39e2 fix: Add missing Cache-Control headers in the production config (#2518) 2021-06-28 18:32:01 +05:30
Pranav Raj SandGitHub ac657e3bf9 fix: Remove style tags from email content (#2515) 2021-06-26 11:50:40 +05:30
Vishnu NarayananandGitHub bed1979986 fix: rvm gpg key issue (#2514)
sks-keyserver gpg pool is now deprecated due to GDPR issues and is
no longer reliable. Switching to use ubuntu keyserver for the time
being as this is the only server returning rvm maintainers gpg keys.
2021-06-25 21:19:08 +05:30
Sivin VargheseandGitHub 151bfbd1dd feat: Creates new component for multiselect. (#2446) 2021-06-25 17:41:24 +05:30
d840b7b13d feat: Adds storybook for search component. (#2444)
* feat: Adds storybook for search component.

* Review fixes

* Uses woot-label for conv-id

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-06-25 17:14:37 +05:30
Pranav Raj SandGitHub bd1b17baf3 feat: Show the CSAT response to the agent (#2511) 2021-06-25 13:37:51 +05:30
b769fc87d0 chore: Adds storybook for woot textarea (#2451)
* chore: Adds storybook for woot textarea

* Review fixes

* Minor fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-06-25 13:18:24 +05:30
Sivin VargheseandGitHub ad431c2008 chore: fixes gutter space between settings page content and sidebar (#2505)
* chore: fixes no gutter space between the settings page content and right content.

* Review fixes
2021-06-25 12:56:10 +05:30
dbddb1ece4 feat: Add CSAT response submit action (#2506)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-25 12:00:49 +05:30
Sivin VargheseandGitHub 2f9637bde5 feat: Adds time zone in Business Hours (#2497) 2021-06-24 17:47:56 +05:30
Sivin VargheseandGitHub ae53aa6cfb feat: Add inbox info to previous conversations (#2491) 2021-06-23 19:29:50 +05:30
Sojan JoseandGitHub cd11efea1d feat: Add CSAT Message Template Hooks (#2494) 2021-06-23 19:29:27 +05:30
Sojan JoseandGitHub 640e028bde chore: Add help-text for slack integration (#2409) 2021-06-23 11:52:06 +05:30
Sojan JoseandGitHub bd9bac75ad fix: Adds condition to handle base and mergee contact being same (#2485)
When an agent updates a contact email in the dashboard and the contact also update his email via the email collect box,
Merge action receives the same base and mergee contacts which could cause data corruption.
2021-06-22 15:57:48 +05:30
Muhsin KelothandGitHub 29b9915d3b feat: Add customer satisfaction component (#2456) 2021-06-22 13:01:19 +05:30
Sivin VargheseandGitHub a357b657a8 chore: Adds story for woot input (#2449) 2021-06-22 07:05:23 +05:30
Muhsin KelothandGitHub 3d748aa8d4 chore: Add contact note model (#2462) 2021-06-21 15:16:26 +05:30
Sivin VargheseandGitHub f809431074 chore: Update the design of the attachments preview (#2447) 2021-06-20 19:54:57 +05:30
Muhsin KelothandGitHub e34fe1c614 fix: Fix the sender tooltip getting undefined in bot messages (#2453) 2021-06-20 19:25:36 +05:30
e45abebe39 feat: Improve scrolling for last message on agent side (#2421)
* Improve chat widget scrolling

* refactor the class names to snake-case

* refactor the scrollTop calculations to a helper

* Add tests for scrollTopCalculationHelper

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2021-06-18 20:12:43 +05:30
6c49e58ff8 feat: Add contact label filter (#2454)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-06-18 20:08:58 +05:30
Sojan JoseandGitHub 50e4bb3e63 chore: Add CSAT survey toggle attribute to Inboxes (#2455)
ref: #1890
2021-06-18 15:55:48 +05:30
Nithin David ThomasandGitHub 6cdefb19a2 chore: Add multiselect support in stories (#2427) 2021-06-18 14:29:43 +05:30
Sojan 0a96ded5bd Merge branch 'release/1.17.1' 2021-06-16 00:48:15 +05:30
Sojan 6b997c6804 Bump version to 1.17.1 2021-06-16 00:47:21 +05:30
Sojan JoseandGitHub af8223545e chore: Swagger documentation for public APIs (#2417) 2021-06-16 00:14:09 +05:30
Pranav Raj SandGitHub 2b9c93a1b3 chore: Disallow unread/campaign view if widget is active (#2432) 2021-06-15 11:35:31 -07:00
Sojan 2d2382a3f8 Merge branch 'release/1.17.0' 2021-06-15 23:21:02 +05:30
Sojan a0331b40d4 Bump version to 1.17.0 2021-06-15 23:20:28 +05:30
7a7f6234b1 chore: Enable Polish (pl), update translations (#2403)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-15 22:15:18 +05:30
Muhsin KelothandGitHub e41957ae02 fix: Campaign message is hiding the conversation view after opening the widget (#2428)
* Fix the widget triggered- campain collision

* fix spelling mistakes
2021-06-15 08:53:16 -07:00
fb2f3ff89f feat: Create campaign conversation only if user interacts with the bubble (#2335)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-15 20:09:42 +05:30
Sojan JoseandGitHub 853db60f8e feat: Add Public APIs for API Channel (#2375) 2021-06-15 20:09:17 +05:30
0f377da109 feat: Add an option to delete campaigns (#2402)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-15 14:14:59 +05:30
Nithin David ThomasandGitHub a56aa5656d chore: Fixes contact panel scroll issue (#2424) 2021-06-14 16:48:33 +05:30
Nithin David ThomasandGitHub fe3f1c3a40 Chore: Update style for new message buton (#2423)
- Changes button style for new message and edit contact in contact page side panel
2021-06-14 10:37:01 +05:30
d21c1c773b feat: Ability to add label for contact page (#2350)
* feat: Ability to add label for contact page

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-06-14 10:36:00 +05:30
fe2af370e0 Feat: Show notes panel on crm page (#2320)
* Feat: Show notes panel on CRM page

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-06-14 09:49:17 +05:30
Nithin David ThomasandGitHub 75d05e55ae Chore: Refactors sidebar styles (#2416)
* Chore: Refactors sidebar styles

* Removes unused i18n
2021-06-11 17:11:13 +05:30
Sivin VargheseandGitHub e9fa9e5eff feat: Add assign to me button next to assign agents. (#2414) 2021-06-11 15:38:46 +05:30
534acfbf96 chore: Ensure privilege validations for API endpoints (#2224)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-11 11:44:31 +05:30
Muhsin KelothandGitHub 5a95c74bf6 fix: Add missing translation in inbox settings page (#2411) 2021-06-10 03:41:55 -07:00
Muhsin KelothandGitHub b9e40d1452 feat: Add an option to enable/disable email collect box (#2399)
* add email collect enabled migration

* migrations

* expose enable_email_collect field

* add select for email collect

* add enable_email condition on new conversation

* add default value true for enable_email_collect

* add specs for email collect enabled

* rereun migration

* code cleanup

* update token life span to 2 months

* revert uuid column
2021-06-10 02:34:03 -07:00
Sivin VargheseandGitHub 8ca63f0b79 chore: Cleanup page-top-bar style conflicts (#2407)
* chore: Class name cleanup page-top-bar.

* prettier spacing fixes

* Review fixes and adds storybook

* Circleci fixes
2021-06-10 09:35:15 +05:30
Muhsin KelothandGitHub 174886671d feat: Add the ability to edit inbox name (#2406) 2021-06-09 21:26:23 +05:30
Nithin David ThomasandGitHub 77d4f86ec9 chore: Clean up contact note styles (#2404) 2021-06-09 18:25:05 +05:30
f79e489a0a chore: Use button component in ReplyBox
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2021-06-09 14:01:43 +05:30
8a0afb912c chore: Add validation error for label create/edit modal (#2381)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-09 13:57:42 +05:30
1bf7227843 chore: Fix emails being sent with the wrong translations (#2236)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-08 22:45:01 +05:30
67ce6f5704 feat: Add regex validation on form message inputs (#2317)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2021-06-08 16:32:01 +05:30
0a087c95fd chore: Message API improvements (#2396)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-08 01:11:06 +05:30
Pranav Raj SandGitHub 1ebab21cfa chore: Configure API channel name and thumbnail (#2398) 2021-06-08 00:22:36 +05:30
9e56565a30 chore: Add status param in conversation APIs (#2394)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-07 20:04:31 +05:30
467b45b427 feat: Improved password security policy (#2345)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-07 17:26:08 +05:30
Sojan JoseandGitHub d1b3c7b0c2 chore: Update Facebook Messenger gem (#2342) 2021-06-07 13:58:01 +05:30
Sojan JoseandGitHub ae3cbf4f79 chore: Expose contact identifier in API (#2391) 2021-06-07 11:46:47 +05:30
Pranav Raj SandGitHub 1155b49e42 fix: Add swagger definition for platform_user_id (#2385) 2021-06-06 21:18:47 +05:30
94a83ea995 feat: Add an option to edit webhook URL (#2316)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-06 16:59:47 +05:30
Muhsin KelothandGitHub 14b51e108a feat: Add Integration hooks UI (#2301) 2021-06-06 16:59:05 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c6487877bf chore: Bump ws from 6.2.1 to 6.2.2 (#2382)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-05 18:58:59 +05:30
c028f30f82 chore: Add a different color for messages from bot (#2374)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-04 21:54:06 +05:30
Muhsin KelothandGitHub 8a283a7783 feat: Ask to confirm with name before inbox/team deletion (#2370) 2021-06-04 13:17:44 +05:30
Nithin David ThomasandGitHub 562a65a70d chore: Cleanup unused components (#2379) 2021-06-04 12:54:16 +05:30
Nithin David ThomasandGitHub 58846e7ad8 chore: Add new color shade + tint for violet (#2373) 2021-06-03 23:21:39 +05:30
f731002b70 fix: Retain focus after sending message in rich content editor (#2372)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-06-03 23:20:30 +05:30
b1228f805e feat: Creates event timeline card component for CRM (#2291)
* feat: Creates event timeline card component for CRM


Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-06-02 23:09:43 +05:30
9a9bcf8153 feat: Create add reminder component for CRM (#2264)
* feat: Creates add reminder component for CRM

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-06-02 22:53:13 +05:30
2fca87e3e7 Feat: Creates reminder list component for CRM (#2258)
* Feat: Creates reminder list component for CRM


Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-06-02 22:48:09 +05:30
Pranav Raj SandGitHub 75fe851345 fix: Update the translation key for Custom Attributes (#2364) 2021-06-02 21:29:53 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Pranav Raj S
b8aaf6c90d chore: Bump dns-packet from 1.3.1 to 1.3.4 (#2346)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-02 21:21:20 +05:30
49be9e21c3 chore: Universal Linking for Android (#2324)
* android assetlinks.json config

* try renaming html to json

* update env example

* chore: fix styling

* chore: styling part 2

* test: add spec for android assetlinks

* minor fixes

* minor fixes

* remove android sha256 value from env example

* add default sh256 value

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-06-02 08:46:45 -07:00
b0b4d9d6f5 enhancement: Current password confirmation in change password (#2108)
* add current password field in change password form

* locale changes

* chore: update password API

* chore: rubocop fixes

* replace currentPassword with current_password

* code cleanup

* replace input with woot-input

* code cleanup

Co-authored-by: Sojan <sojan@pepalo.com>
2021-06-02 05:22:24 -07:00
Nithin David ThomasandGitHub 2c42e70637 feat: Add support for canned response command anywhere on rich text editor (#2356) 2021-06-02 10:20:40 +05:30
Sojan JoseandGitHub 22965be6dc feat: Add AgentBot APIs (#2323) 2021-06-01 22:34:25 +05:30
Sojan JoseandGitHub 9d16e52e33 chore: Add Swagger docs for Platform APIs (#2349) 2021-05-31 10:58:43 +05:30
Sivin VargheseandGitHub cc75a668cb feat: Create section header component (#2296) 2021-05-31 10:07:07 +05:30
Pranav Raj SandGitHub 25ba852b68 chore: Adjust Chatwoot Config to deploy frontend as a separate app (#2347) 2021-05-28 19:21:16 +05:30
Sojan JoseandGitHub 3b39eb3e33 chore: ability to run Chatwoot as API only server (#2344)
- Ability to run chatwoot as an API only server
- Removes action cable testing gem since it is merged to rails 6
2021-05-27 20:07:21 +05:30
Nithin David ThomasandGitHub 9c555e70c9 fix: Uses label component for add label button (#2337)
* fix: Uses label component for add label button

* Use button instead of span
2021-05-27 08:24:29 +05:30
Sojan JoseandGitHub 9ffdb0ec70 chore: Add select field example to WootMessageSeeder (#2338)
Fixes: #2076
2021-05-25 21:41:53 +05:30
Pranav Raj SandGitHub 12c68e8a3c chore: Upgrade @sentry/vue to 6.4.1 (#2332) 2021-05-25 14:10:09 +05:30
Muhsin KelothandGitHub cfdf4a12c8 chore: Add missing frontend specs (#2329)
* complete dshboard api specs

* code cleanup

* add conversation mixin spec

* add isadmin mixin spec

* add agent details component spec

* add notification badge spec

* spec for thumbnail exist in agent details

* fix the deprecation warnings

* add agent details spec

* add account selector specs

* code cleanup

* refactor contact spec

* review fixes

* review fixes

* add shared spec helper

* update api spec helper

* review fixes
2021-05-25 01:30:21 -07:00
Nithin David ThomasandGitHub 652d988993 fix: Fixes email overflow issue in conversation. (#2331) 2021-05-25 12:53:00 +05:30
Muhsin KelothandGitHub 62d19911be chore: Add chatwoot utils package (#2307)
* add chatwoot utils package

* remove color helper

* replace contrasting text color  with chatwoot util
2021-05-24 00:13:03 -07:00
Sojan JoseandGitHub 58dd6d37e0 chore: Update language translations (#2321) 2021-05-21 23:52:38 +05:30
Nithin David ThomasandGitHub ac2c5c93b9 chore: Update webhook delete button styles(#2322)
* Chore: Fixes style issue of webhook button

* Review fixes
2021-05-21 07:19:57 -07:00
26ba8e6ff7 feat: Create custom attributes for a contact from CRM (#2299)
* feat: Creates cutom attributes for a contact from CRM

* Review fixes

* Change inline forms edit icon size

* Review fixes

* Fix validation labels color

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-05-21 19:22:47 +05:30
Sojan JoseandGitHub 64718eb879 fix: Broken Docker production config (#2319)
fixes: #2110
2021-05-21 18:55:42 +05:30
Sojan JoseandGitHub bb1c028926 fix: Slack integration redirect url missing the client ID (#2309)
Fixes: #2304
2021-05-21 00:03:09 +05:30
Nithin David ThomasandGitHub 2a492b4162 Chore: Refactors view note component (#2310) 2021-05-20 23:41:15 +05:30
Nithin David ThomasandGitHub 047617713e Chore: Refactor add note to use foundation card classes (#2308) 2021-05-20 23:08:05 +05:30
Sojan JoseandGitHub 46356d0bf9 docs: Add documentation for integration APIs (#2300) 2021-05-20 20:46:45 +05:30
Nithin David ThomasandGitHub c681e8a01b chore: Refactor button styles (#2259) 2021-05-20 13:51:46 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Sojan Jose
af8e681f2a chore: Bump puma from 4.3.6 to 4.3.8 (#2294)
Bumps [puma](https://github.com/puma/puma) from 4.3.6 to 4.3.8.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v4.3.6...v4.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-05-19 17:14:15 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Sojan Jose
71d1f229f0 chore: Bump nokogiri from 1.11.3 to 1.11.4 (#2293)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.3 to 1.11.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.3...v1.11.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-05-19 16:37:05 +05:30
Sojan 090b5f46e8 Merge branch 'release/1.16.2' 2021-05-18 16:05:18 +05:30
Sojan 10c18aa7f1 Bump version to 1.16.2 2021-05-18 16:04:26 +05:30
20a0d381a7 fix: Resolve infinite loop with campaign API call (#2290)
Co-authored-by: Muhsin <muhsinkeramam@gmail.com>
2021-05-18 12:15:23 +05:30
Sojan bc9db36d62 Merge branch 'release/1.16.1' 2021-05-18 00:25:05 +05:30
Sojan b8836aa41e Bump version to 1.16.1 2021-05-18 00:24:18 +05:30
1290e32150 fix: Resolve bot name if sender value is empty (#2283)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-05-18 00:22:43 +05:30
Sojan 10f3d321de Merge branch 'release/1.16.0' 2021-05-18 00:08:00 +05:30
Sojan 525718c8c5 Bump version to 1.16.0 2021-05-18 00:06:53 +05:30
cf09c2af4d chore: Update language translations (#2280)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-05-17 23:53:19 +05:30
f925bc22e2 chore: Add sender details in Unread message (#2277)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-05-17 21:38:59 +05:30
Muhsin KelothandGitHub 610a7c661e chore: Execute campaigns based on matching URL (#2254) 2021-05-17 21:38:35 +05:30
Muhsin KelothandGitHub 18cea3b0ac chore: Add inbox id in get campaigns API (#2278) 2021-05-17 21:38:12 +05:30
Sivin VargheseandGitHub 60177ef418 feat: Update UX for adding label in a conversation (#2243) 2021-05-17 12:00:08 +05:30
Pranav Raj SandGitHub ef2611164d fix: Use reply content if available (#2025)
* fix: Use text_content reply if available
* Use reply instead of full message from html_content
2021-05-17 11:16:50 +05:30
Sojan JoseandGitHub d5215fea93 feat: APIs for Integration Hooks (#2250)
- Introduces JSON Schema validations via JSONSchemer
- Add CRUD APIs for integration hooks
2021-05-17 10:32:59 +05:30
Pranav Raj SandGitHub 4aa35953c4 fix: Upgrade chart.js to 2.9.4, fix grid-line option (#2268) 2021-05-16 16:41:30 +05:30
Nithin David ThomasandGitHub d35e8cfd98 feat: Creates component show all contact info (#2252)
* feat: Adds component to show contact fields
* feat: Creates component show all contact info
2021-05-13 15:40:36 +05:30
73d30b7f69 chore: Refactor sidebar button with woot-button (#2231)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-13 15:39:10 +05:30
Pranav Raj SandGitHub 836b317b8a feat: Remove restrictions on API channel webhook_url (#2261) 2021-05-13 15:03:25 +05:30
Nithin David ThomasandGitHub 35f8d01a0c chore: Fix warnings in jest (#2262) 2021-05-13 15:03:04 +05:30
Pranav Raj SandGitHub 0e6cd699e8 feat: Sort contacts via name, email, phone_number, last_activity_at (#1870) 2021-05-13 13:32:19 +05:30
368bab2553 chore: Refactor contact page button with button component (#2234)
* chore: Refactor contact page buttons with woot-button component


Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-13 12:05:24 +05:30
Sojan JoseandGitHub 3639fb1d71 chore: Add documentation for APIs (#2248) 2021-05-11 22:38:46 +05:30
Nithin David ThomasandGitHub 585dd1b005 feat: Create component to show contact fields on CRM (#2251) 2021-05-11 21:17:10 +05:30
Pranav Raj SandGitHub c1a519db43 chore: Add Message API, cleanup conversation_id param (#2249) 2021-05-11 20:20:52 +05:30
Muhsin KelothandGitHub b5ef9f14e1 chore: Add bot in campaign add/edit form (#2246)
* fix empty message condition in campaign table

* add bot in campaign

* locale changes

* review fixes
2021-05-10 21:41:43 +05:30
Nithin David ThomasandGitHub 627a89faf0 feat: Add inline editing support for CRM attributes (#2241) 2021-05-10 20:01:45 +05:30
a216297ce1 feat: Increase the width of the message bubble (#2235)
* feat: Increase the width of the message bubble

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-10 19:58:44 +05:30
a33617cadd feat: Adds 3 column layout for contact page (#2174)
* Feat: Adds 3 column layout for contact page

* Makes a mixin for 3 column layouts

* Fixes story meta

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-05-10 04:41:08 -07:00
3fc646f330 feat: Add campaigns in web widget (#2227)
* add campaign store(getter, actions and mutations)

* add campaign store module

* add get campaigns api

* add fetch campaign action widget load

* add specs

* code cleanup

* trigger campaig api fixes

* integrate campaign trigger action

* code cleanup

* revert changes

* trigger api fixes

* review fixes

* code beautification

* chore: Fix multiple campaigns being send because of race condition

* chore: rubocop

* chore: Fix specs

* disable campaigns

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2021-05-10 00:31:00 -07:00
Muhsin KelothandGitHub db31bfcee4 feat: Edit campaigns (#2230)
* add edit campaign component
2021-05-10 12:40:48 +05:30
7f6abdc987 fix: Add plus icon in sidebar items to settings create page (#2141)
* [Issue-#1965] Add changes

* Added newLink prop with default value true to show the new icon

* Fix button alignment

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-08 19:06:41 +05:30
055008cf03 chore: refactor css styles for forms (#2240)
* chore: refactor css styles for forms

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-05-07 20:02:19 +05:30
899ddcef0d fix: Fixes overlaps for name in conversation header (#1978)
* Fix width of text

* Review fixes

* Use mixins

* user name textoverflow

* Review fixes: Remove changes in text-truncate class

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-07 18:28:47 +05:30
4c47d6fd97 fix: Upgrade rails to fix CVE-2021-22904 (#2233)
* fix: Upgrade rails to fix CVE-2021-22904
* chore: Update administrate

Co-authored-by: Sojan <sojan@pepalo.com>
2021-05-07 00:59:22 +05:30
Pranav Raj SandGitHub df04450ab9 fix: Rename migration for Campaigns (#2232) 2021-05-07 00:56:32 +05:30
2839454bc0 feat: Creates label dropdown component (#2220)
* Feat: Creates label dropdown component

* fixes conflicts in i18n

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-06 20:01:26 +05:30
Sivin VargheseandGitHub 5c80d0ac42 feat: Creates add button component for label (#2223) 2021-05-06 19:33:36 +05:30
Muhsin KelothandGitHub 6245a10a70 feat: Campaign table (#2212)
* code cleanup

* add campaign table

* update locale texts

* locale text cleanup

* Rename selectedAgent with selectedSender in add campaign form

* code cleanup

* remove timer mixin

* update avatar size to 20px

* add border for table

* add campaigns get action specs

* rename campaign table component

* fix style issues

* update sender list based on inbox permission

* style fixes

* review fixes

* add campaign sender component

* replace wootsubmit button with wootbutton

* update scroll width

* replace campaign status with woot label

* changes as per review

* style fixes

* remove unused code

* disable campaign in inbox settings page

* review fixes
2021-05-05 22:16:59 -07:00
Nithin David ThomasandGitHub 381c358ffd chore: Add color variants to label component (#2226)
* Chore: Adds color variants to label

* Move component to UI folder
2021-05-05 22:53:23 +05:30
b30ecb27a6 feat: Add APIs for Dialogflow integration V1 (#2155)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-05-05 21:06:11 +05:30
Pranav Raj SandGitHub fd0c26cdae chore: Add API documentation for teams (#2221)
Add API documentation for teams
2021-05-05 20:39:00 +05:30
Sivin VargheseandGitHub 6469acc750 Enhancement: Adds story for label component (#2222)
* Enhancement: Adds story for label component
2021-05-05 16:46:23 +05:30
05310e25d4 feat: Creates notes list component for CRM (#2195)
* Feat: Creates note list component for CRM

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-05 13:36:45 +05:30
262d153c18 feat: Add a component to display contact attributes in CRM (#2217)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-05-05 12:09:34 +05:30
Nithin David ThomasandGitHub fd67a5795a Chore: Removes unused impports in ContactIntro (#2218) 2021-05-05 00:16:02 +05:30
Muhsin KelothandGitHub 2d4acaf8fe change button component name (#2216) 2021-05-04 21:48:20 +05:30
35f0fba51d fix: Add validation on the message length in Vue (#2209)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-05-04 19:31:00 +05:30
8459d09b6a feat: Add a component to show contact information (#2204)
* Feat: Add component to show contact introduction.

* fix: Hide sperator if company is not present

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-05-04 19:28:18 +05:30
Nithin David ThomasandGitHub 8bcac2aab0 fix: Truncates overlapping name in contact table (#2208) 2021-05-04 15:21:34 +05:30
Muhsin KelothandGitHub 7c7f91e70f feat: Add campaign (#2177) 2021-05-04 15:08:41 +05:30
Pranav Raj SandGitHub eaa61c3745 fix: Use full width for branding (#2203) 2021-05-03 21:59:57 +05:30
Sojan JoseandGitHub 98e2a9b8b5 feat: Builder for creating Campaign conversations (#2192)
- Builder for creating Campaign conversations
- Widget endpoint to fetch the campaigns
2021-05-03 20:23:09 +05:30
Muhsin KelothandGitHub b649516fbb fix: Change storybook relative path (#2199)
* fix the storybook realtive path issue

* move stories to realtive to compoent
2021-05-02 14:40:46 +05:30
Sivin VargheseandGitHub 6a7b98b345 Feat: Creates add note component for CRM (#2187)
* Feat: Creates add note component for CRM
2021-05-01 19:26:17 +05:30
Pranav Raj SandGitHub 49c7bf5ae4 fix: Set babel/preset-env to 7.13.15 (#2191) 2021-04-30 20:54:29 +05:30
Sojan JoseandGitHub a07200bedf chore: Campaign ID migration for existing accounts (#2189)
* chore: Campaign ID migration for existing accounts

* chore: update factory

* chore: minor fixes

* chore: fixes
2021-04-30 06:15:24 -07:00
Nithin David ThomasandGitHub bd7e9d2790 chore: Add i18n and components into storybook (#2188)
* chore: Add i18n and store into storybook

* Use empty store to init storybook
2021-04-30 15:24:00 +05:30
b6f57d7fc1 feat: Creates note component for CRM (#2181)
* Feat: Creates note component for CRM


Co-authored-by: Nithin David <webofnithin@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-04-30 12:02:20 +05:30
Sojan JoseandGitHub b89cc9cf57 feat: Add APIs for Campaigns (#2175) 2021-04-29 22:23:32 +05:30
Nithin David ThomasandGitHub 3afc9b5f5b chore: Setup storybook for Vue components (#2139) 2021-04-29 22:12:06 +05:30
Pranav Raj SandGitHub 979d4fe76b chore: Upgrade rexml to 3.2.5 to fix CVE-2021-28965 (#2179) 2021-04-29 17:23:25 +05:30
4b49d21543 chore: Add event for conversations transferred to Bot (#2167)
* chore:  Event for conversation transferred to Bot

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David <webofnithin@gmail.com>
2021-04-28 20:53:23 +05:30
aa47bad4c1 chore: Add campaign empty page (#2173)
* Enhancement: Create route for contact details page

* add campaign page, add button, campaign description

* add locale texts

* update locale texts

* update grid

Co-authored-by: Nithin David <webofnithin@gmail.com>
2021-04-28 06:27:47 -07:00
6ea1e0d047 chore: Add route for contact details page (#2168)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-27 21:31:11 -07:00
8ea35802b4 fix: Handle email with no subject line and no body (#2164)
* fix: Add a default email subject line if no subject is present

* Add a default on the frontend

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-27 10:51:04 -07:00
Sivin VargheseandGitHub c10efd2c7b chore: inbox member clean up (#2144)
Delete unused logic and tests
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-27 20:59:00 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f1f4a35b2b chore: Bump oauth from 0.5.4 to 0.5.6 (#2151)
Bumps [oauth](https://github.com/oauth-xx/oauth-ruby) from 0.5.4 to 0.5.6.
- [Release notes](https://github.com/oauth-xx/oauth-ruby/releases)
- [Changelog](https://github.com/oauth-xx/oauth-ruby/blob/master/HISTORY)
- [Commits](https://github.com/oauth-xx/oauth-ruby/compare/v0.5.4...v0.5.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 18:19:09 +05:30
Pranav Raj SandGitHub 0bb10cff2d chore: Add font-display: swap to Ionicons (#2161) 2021-04-26 10:39:33 -07:00
Niklas HaugandGitHub 78996937ce fixed object destructuring to fallback to {} when meta.team is null (#2158) 2021-04-26 15:30:26 +05:30
285f7bbeb5 Enhancement: Ability to assign administrators as conversation assignees (#2142)
* Enhancement: Ability to assign administrators as conversation assignee

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-22 23:17:29 +05:30
Niklas HaugandGitHub 87078e1abf fix: Clear search input which navigating to other tab/page (#2061) 2021-04-22 13:58:04 +05:30
Sivin VargheseandGitHub 6c7c5064d1 Fix: Broken empty state for agents dropdown. (#2143) 2021-04-21 14:24:03 +05:30
fdbc32f7c2 enhancement: Show agent availability status in conversation assignee select list (#2122)
* show agent status on conversation assignation

* add agent status in contact sidebar

* availability status badge component

* review fixes

* review fixes

* chore: Fixes issue with status badge (#2136)

* add empty case in agent list

* Chore: Availability badge shape issue. #2140

Co-authored-by: Nithin David <webofnithin@gmail.com>
Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2021-04-21 12:18:48 +05:30
Sojan 5c843b8a51 Merge branch 'release/1.15.1' 2021-04-20 23:41:03 +05:30
Sojan 950164429e Bump version to 1.15.1 2021-04-20 23:38:38 +05:30
3a4d316a9d chore: Identify contacts based on phone number (#2134)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-20 10:12:14 -07:00
Pranav Raj SandGitHub 98e20e8607 chore: Enable the languages no, zh-CN, hu (#2135) 2021-04-20 16:22:03 +05:30
Sojan JoseandGitHub 4635e5bb44 feat: Assignable agents API (#2131)
`inboxes/id/assignable_agents` returns all users that have permission to a conversation happening in that inbox.
2021-04-20 13:46:20 +05:30
fb582614f2 chore: add SECURITY.md (#2103)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-04-20 13:26:35 +05:30
Muhsin KelothandGitHub 90de0e4843 chore: Change reset password error message(#2133) 2021-04-20 00:54:33 -07:00
Sojan JoseandGitHub ea74462209 feat: Manage platform apps from Super Admin (#2129)
- ability to manage platform apps from super admin
- fixes #2021
2021-04-20 00:01:05 +05:30
fa525fc107 Fix: Agent name overflow in dropdown menu (#2047)
* Fixes agent name overflow

Co-authored-by: Sivin Varghese <64252451+sivin-git@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-04-19 22:24:45 +05:30
773557e49b chore: Snackbar duplicate key warnings (#2121)
* fix the duplicate key warning in woot snackbar

* review fixes

* remove console.log

Co-authored-by: Nithin David <webofnithin@gmail.com>
2021-04-19 22:21:59 +05:30
Sivin VargheseandGitHub 654893b6d7 Chore: fix the resolve button padding issue. (#2130) 2021-04-19 22:17:02 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8f2234671b chore: Bump ssri from 6.0.1 to 6.0.2 (#2126)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 15:53:00 +05:30
043919b3e5 chore: New Crowdin Translation updates (#2063)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-04-19 15:10:16 +05:30
27e01920ad chore: Upgrade v-tooltip version (#2112)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-18 22:59:54 -07:00
Nithin David ThomasandGitHub c95aeb894f Fix: Fetch contactable inboxes on new conversion (#2113)
* Fix: Fetch contactable inboxes everytime
2021-04-17 20:08:03 +05:30
Sojan 8720f39ffb Merge branch 'release/1.15.0' 2021-04-16 23:02:28 +05:30
Sojan 66b42de3a6 Bump version to 1.15.0 2021-04-16 22:59:18 +05:30
Nithin David ThomasandGitHub 864471a21e feat: Create a new conversation from the contact panel (#2019)
* Chore: Improve button component styles
2021-04-16 20:31:07 +05:30
c287ad08fb fix: Hide rich editor for unsupported channels (#2102)
* Fix: Hide rich editor for unsupported channels

* Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-16 06:33:46 -07:00
Nithin David ThomasandGitHub 98bfef026e Chore: Add validation for contact phone field (#2105) 2021-04-16 06:18:13 -07:00
Muhsin KelothandGitHub ce4ce3c86c fix: Check uploaded file size in widget and dashboard (#1975)
* File size check logic in widget

* set maxium file size

* update locale texts

* file size check in dashboard

* dynamincally set file size limit error message

* code climate review fixes

* add alert mixin

* move attahcment bus event to constants

* Move file size check logic to helper

* add specs for file size limit check helper

* changes as per review
2021-04-15 22:28:19 +05:30
Sojan JoseandGitHub 45e43b0b89 feat: Contactable Inboxes API (#2101)
- Add endpoint which lists inboxes through which a contact can be contacted
- Conversation creation API auto-creates contact_inbox for specific channels [ Twilio, email, api]
- Ability to send the initial message payload along with the conversation creation
- Fixes #1678 ( issue saving additional attributes for conversation )
2021-04-15 15:13:01 +05:30
Sivin VargheseandGitHub ba41a10609 Fix: Order list number break issue (#2097) 2021-04-14 15:20:13 +05:30
Sivin VargheseandGitHub 997447364c fix: Responsive issue in activity message (#2090) 2021-04-13 22:58:54 +05:30
Sivin VargheseandGitHub 3e8c25b4a0 Enhancement: Changes contact location flag position (#2091) 2021-04-13 19:27:44 +05:30
Sivin VargheseandGitHub a14e8ba250 Fix: Adds favicon badge for notification alert. (#2079)
* Adds favicon badge for notification alert.
2021-04-13 19:25:19 +05:30
4387736f1a fix: refresh user teams after create/edit/delete team (#2093)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-04-13 19:19:44 +05:30
Muhsin KelothandGitHub 2bb2d4aa25 fix: error response has undefined issue (#2092) 2021-04-13 18:21:46 +05:30
Sojan JoseandGitHub c4ae901591 chore: Fix Twilio file uploads (#2088) 2021-04-13 01:39:51 -07:00
Muhsin KelothandGitHub 04a9dc630a enhancement: Enable reply box for whatsapp template message (#2082)
* remove 24-hours reply restriction in WhatsApp

* remove the console.logs

* move reply policy to separate constants file

* fix spelling mistake
2021-04-12 03:45:11 -07:00
Sivin VargheseandGitHub 7eb766a457 Fix: Dropdown width issue in safari browser. (#2080) 2021-04-10 20:03:45 +05:30
03bd34be86 Fix: Populate only agents part of the inbox in conversations (#2060)
* Fix: Show only agents part of the inbox in conversations

* Show only verified agents

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-04-09 14:32:29 +05:30
98f4a2f6f3 Fix: Dropdown width issue fixes by using fit-content (#2048)
* Dropdown width issue fixes by using fit-content

* Review fixes

* Review fixes

* Review fixes

* Review fixes

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-04-08 19:42:38 +05:30
28fb6469a3 Fix: Alignment issue in activity message (#2057)
* Fixes alignment issue in activity message

* Codeclimate fixes

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-04-08 19:42:03 +05:30
Sojan JoseandGitHub 2140443f07 chore: Add huntr.dev badge (#2069) 2021-04-08 19:41:26 +05:30
Sivin VargheseandGitHub 3e03b08ad0 Enhancement: Adds a new button that redirect to inbox config page (#2066)
* Adds a new button that redirect to inbox config page

* Review fixes
2021-04-08 16:01:46 +05:30
Sivin VargheseandGitHub 012502a2d1 chore: Refactor shouldShowInboxes function name (#2065) 2021-04-08 11:44:23 +05:30
Muhsin KelothandGitHub cc3da031e2 enhancement: Profile settings accessibility improvements (#2054)
* profile settings in to separate form

* update locale texts

* replce woot-submit-button with woot-button

* disable button if value is empty

* change condition

* code climate fixes
2021-04-07 12:28:50 +05:30
Nithin David ThomasandGitHub a377da9028 chore: Change size of assignee dropdown in header (#2027)
* Chore: Change size of assignee dropdown in header

* Fix: prevent overflow of agent name in multselect
2021-04-07 11:45:33 +05:30
Nithin David ThomasandGitHub 7c9cd8aa1e feat: Add a dropdown to change status to "bot" (#1997) 2021-04-07 11:44:58 +05:30
Nithin David ThomasandGitHub 7a890e543a chore: Improve button component styles (#1996) 2021-04-07 11:43:16 +05:30
Sivin VargheseandGitHub dbb41c12a2 Enhancement: Added hover effect for conversations (#2059) 2021-04-06 20:22:38 +05:30
Muhsin KelothandGitHub c5ff86667f update mixin prop name (#2051) 2021-04-05 18:36:38 +05:30
Sivin VargheseandGitHub bce5e29c49 fix: Allow text overflow in a conversation for wide emails (#2028) 2021-04-05 10:52:51 +05:30
Nithin David ThomasandGitHub 1d3b1c1ae5 Fix: invalidates session if user cookie is absent (#2046) 2021-04-02 15:31:22 +05:30
Pranav Raj SandGitHub 1b99ab3098 fix: Use exisiting bubble nodes if available (#2026) 2021-04-02 15:04:16 +05:30
bf8f19b334 Fix: Reply box overflow issue (#2034)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-04-01 21:09:27 +05:30
Sivin VargheseandGitHub de72530022 Fix: responsive issue conversations hamburger menu (#2036) 2021-04-01 20:57:43 +05:30
Sojan JoseandGitHub c8b81b066b chore: Add timeouts to requests (#2024) 2021-03-31 16:39:57 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f5a961b27c chore: Bump y18n from 4.0.0 to 4.0.1 (#2022)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 14:42:00 +05:30
Sojan JoseandGitHub bb37f7b263 chore: Handle Sentry Errors (#2020)
If a contract contains an invalid email address, the sidekiq jobs for conversation continuity would error out. handling this exception gracefully.
2021-03-30 21:06:31 +05:30
Pranav Raj SandGitHub 71214b59d8 fix: Add missing translations in agent reports (#2017) 2021-03-30 20:00:17 +05:30
Sojan JoseandGitHub 42534e1df4 chore: Add fail safes for Redis connections (#2016) 2021-03-30 18:16:17 +05:30
Sojan JoseandGitHub c95ad8dd4f chore: Remove validation on team name (#2014) 2021-03-30 16:02:41 +05:30
Sojan JoseandGitHub 6bb026621d fix: Current.user nil issue when using access tokens (#2012) 2021-03-29 23:26:20 +05:30
24fea5fbe0 chore(docs): Add docker pull count badge (#2005)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-03-29 13:05:51 +05:30
Pranav Raj SandGitHub 1ce36539aa fix: Show inbox name only if more > 1 inbox present (#2004) 2021-03-29 11:09:06 +05:30
Sojan bbf74f218f Merge branch 'release/1.14.3' 2021-03-27 18:45:38 +05:30
Sojan 33ca4e0e80 Bump version to 1.14.3 2021-03-27 18:44:57 +05:30
Pranav Raj SandGitHub 6a55960d4a fix: Revert quoted text styles (#2003) 2021-03-27 13:54:50 +05:30
Pranav Raj SandGitHub 8285f5df15 fix: Handle rendering HTML only email in UI (#1987) 2021-03-27 13:29:04 +05:30
Nithin David ThomasandGitHub 8612f307b3 Chore: Update widget offline message (#2001) 2021-03-27 13:08:09 +05:30
Sojan JoseandGitHub c453455ad1 fix: Handle application errors in Sentry (#1982)
- Handle notification errors for attachment messages
- Fix empty identifiers being passed
- Fix 404 when invalid source id
- Handle webhook exceptions
2021-03-27 12:27:48 +05:30
Sojan JoseandGitHub 9903e47896 chore: update rails to 6.0.3.6 (#1998) 2021-03-27 10:52:14 +05:30
Sivin VargheseandGitHub a246989551 Enhancement: button component (#1932) 2021-03-26 20:20:20 +05:30
Muhsin KelothandGitHub ff69ef7317 Enhancement: Sort labels (#1995) 2021-03-26 04:50:38 -07:00
Sojan a0cd1f8bcc Merge branch 'release/1.14.2' 2021-03-23 01:20:34 +05:30
Sojan 5dfc4f35a6 Bump version to 1.14.2 2021-03-23 01:20:03 +05:30
Nithin David ThomasandGitHub 43b5a435ec Fix: Add check for id on update conversation (#1966) 2021-03-22 20:24:51 +05:30
Sojan 818f45916e Merge branch 'release/1.14.1' 2021-03-21 01:46:59 +05:30
Sojan b94e87584b Bump version to 1.14.1 2021-03-21 01:45:13 +05:30
Siddharth RameshandGitHub 763d8d37df Fix error messages during login for non-verified users (#1945) 2021-03-20 17:44:58 +05:30
Nithin David ThomasandGitHub 3043ee5058 Fix: Hide prechat for sessions inititated with setUser (#1914) 2021-03-20 17:44:20 +05:30
Nithin David ThomasandGitHub 484c32fae3 Fix: sidebar filters not applying bug for chatlist (#1938) 2021-03-20 17:42:29 +05:30
Nithin David ThomasandGitHub 4657e5c713 Fix: Refactors error prone checks (#1947) 2021-03-20 17:12:36 +05:30
Sivin VargheseandGitHub e289106c5b Chore: Hover color for status dropdown (#1906) 2021-03-20 13:08:56 +05:30
Nithin David ThomasandGitHub 6afa1fb556 Fix: Error when assigns a conversation to user (#1926) 2021-03-19 12:55:05 +05:30
Pranav Raj SandGitHub 54d578676b fix: Use team conversationURL in team section (#1921)
Fixes: #1917
2021-03-16 19:44:50 +05:30
Sojan JoseandGitHub e44e9fc025 chore: Fix SMTP mailer config defaults (#1923) 2021-03-16 19:40:49 +05:30
Sojan fe8fc570f6 Merge branch 'release/1.14.0' 2021-03-16 00:12:57 +05:30
Sojan 000f17c2dd Bump version to 1.14.0 2021-03-16 00:12:19 +05:30
Sojan JoseandGitHub 866de4ae2d chore: New translation updates 2021-03-16 00:00:53 +05:30
Muhsin KelothandGitHub 7d5493ac78 chore: enable close button in react-native widget (#1910) 2021-03-15 22:40:26 +05:30
Sojan JoseandGitHub b6f4006c15 Chore: Migration to enable email channel (#1913)
fixes: #1877
2021-03-15 19:15:48 +05:30
3fd398879e Fix: conversation list user name overflow (#1912)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-03-15 18:38:37 +05:30
Sivin VargheseandGitHub 36f086c5cb feat: Redesigned search UI (#1845) 2021-03-15 18:38:05 +05:30
Nithin David ThomasandGitHub c99c63cd79 Feat: Assign conversations to teams. (#1849) 2021-03-15 18:37:03 +05:30
Nithin David ThomasandGitHub 941d4219f0 feat: Set up store for teams (#1689) 2021-03-15 18:35:56 +05:30
Sojan JoseandGitHub cadb246eaa chore: fix empty user_name. & password (#1907) 2021-03-14 15:39:47 +05:30
Sivin VargheseandGitHub efcf10c00f chore: Added hover styles (#1905) 2021-03-14 14:10:16 +05:30
33b73451b7 Fix: Update offline message in widget by availability (#1879)
Feat: Display out of office message based on business hours

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2021-03-13 14:06:25 +05:30
Nithin David ThomasandGitHub 2a28e05a77 Fix: Make pre-chat message minimum length to 1 (#1898) 2021-03-13 11:46:08 +05:30
6c87001a0e Feat: Show working hours on widget (#1823)
Feat: Display out of office message based on business hours

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-03-13 11:44:28 +05:30
1d2e1a2823 Feat: business hours settings page (#1812)
Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-03-13 11:42:51 +05:30
Sojan JoseandGitHub dbf515ab5a chore: Make SMTP environment variables configurable (#1868)
fixes: #1647
2021-03-12 15:37:06 +05:30
Sojan JoseandGitHub 42e83de5b0 feat: Activity messages for team assignments (#1893)
- assignment messages when the conversation team is changed
- change assignee based on team
- move round-robin and assignee logic to concerns
2021-03-12 15:13:58 +05:30
Nithin David ThomasandGitHub 38d1b0eae3 Chore: Reply panel emoji button size fixes (#1896) 2021-03-11 21:48:52 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
22fecf0d84 chore: Bump elliptic from 6.5.3 to 6.5.4 (#1884)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-10 18:44:51 +05:30
Sivin VargheseandGitHub cdd8d85815 Fix: Conversation timestamp and thumbnail position issue (#1885) 2021-03-10 10:33:45 +05:30
Sivin VargheseandGitHub 1c7e5df91a Enhancement: Conversation item redesign (#1857)
* Rearrange the inboxes label in conversations.
2021-03-09 19:52:14 +05:30
Sivin VargheseandGitHub 94159ca9df Fix: Canned responses table column width breakage (#1881) 2021-03-09 18:37:18 +05:30
Nithin David ThomasandGitHub 0e40f8a10f Fix: emoji box not showing up (#1873) 2021-03-09 15:26:03 +05:30
Nithin David ThomasandGitHub 759ed43745 Chore: Responsive fixes for common screen widths (#1856) 2021-03-08 13:30:33 +05:30
Nithin David ThomasandGitHub d70208a0a8 Fix: apply alert conditions while document is hidden (#1859) 2021-03-08 13:13:13 +05:30
Sojan d5c6e8e8c8 Merge branch 'master' into develop 2021-03-07 20:44:31 +05:30
प्रथमेश SonpatkiandGitHub d692eac260 chore: Add name to the sender email id (#1485) 2021-03-07 20:42:45 +05:30
Muhsin KelothandGitHub d8cb03525f chore: add post message event for sending cookie to rn widget (#1860) 2021-03-05 21:47:38 -08:00
Nithin David ThomasandGitHub 9e8a943ec7 feat: Add audio alert for incoming messages on dashboard (#1738)
Fixes: #1345
2021-03-04 19:24:03 +05:30
Sojan JoseandGitHub ca4a766b82 chore: Enable email channel (#1851) 2021-03-04 13:59:59 +05:30
RicardoandGitHub 6aed01de0c chore: Revised Spanish translation (#1761) 2021-03-03 17:12:22 +05:30
5f250e5b3a chore: Move conversation header above sidebar (#1835)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-03-02 22:44:04 +05:30
Siddharth RameshandGitHub 2120734f67 Chore: Update social icon colors on sidebar (#1846) 2021-03-02 18:27:22 +05:30
89e5f18dfb feat: Update design of Contacts table (#1753)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-03-01 22:28:15 +05:30
Sojan JoseandGitHub 03bc4bf224 fix: Greeting messages not sent when pre-chat form is enabled (#1842) 2021-03-01 10:58:49 +05:30
David PedonezeandGitHub 60b25760fb fix: Resolve pt_BR inboxMgmt SETTINGS locale typo (#1836) 2021-02-28 13:43:38 +05:30
Pranav Raj SandGitHub d6391be4db feat: Update UI for edit contact modal (#1833) 2021-02-27 12:33:12 +05:30
Muhsin KelothandGitHub aab70bf1f1 fix: attachment rendering if the message content is empty in private note (#1831)
Fixes #1830
2021-02-25 22:40:03 +05:30
Pranav Raj SandGitHub 00954aa16f fix: Upgrade browser gem to fix missing push config in Opera (#1828) 2021-02-25 14:03:33 +05:30
82a1ad891d feat: Add a view to assist user while onboarding (#1826)
Co-authored-by: Nithin David <webofnithin@gmail.com>
2021-02-24 11:16:38 +05:30
Sojan JoseandGitHub f424a832f4 fix: Log config env variable typecasting (#1792) 2021-02-23 20:48:15 +05:30
Ankur PatelandGitHub 01ee3d7f8b chore: Removing unused index method from Widget Controller (#1819) 2021-02-23 20:04:49 +05:30
Sojan JoseandGitHub 0e721653e5 feat: Business hour Inbox APIs (#1821)
* feat: Business hour Inbox APIs
2021-02-23 12:11:15 +05:30
Nithin David ThomasandGitHub a3b0de63de Feat: Component for setting business hour availability (#1794)
* Component business hour setting availability
2021-02-22 16:30:58 +05:30
Sivin VargheseandGitHub 4cbdbbe4bd chore: Changes the dropdown ui (#1813)
* Changes the dropdown ui
2021-02-22 10:52:50 +05:30
Nithin David ThomasandGitHub c17380d48a Feat: Create contact from contacts page (#1806)
* Add contact create modal to contacts page

* Test cases

* Review fixes
2021-02-19 20:22:58 +05:30
Sojan 6ba25bae3d Merge branch 'release/1.13.1' 2021-02-19 19:40:45 +05:30
Sojan d1b9e21ea5 Bump version to 1.13.1 2021-02-19 19:39:01 +05:30
Sojan JoseandGitHub 1612f515b0 chore: Fix issues with notification actors (#1807) 2021-02-19 18:35:21 +05:30
Nithin David ThomasandGitHub eec90a1319 chore: Refactor Edit contact modal to separate form (#1805) 2021-02-19 00:10:32 +05:30
Pranav Raj SandGitHub 6bbeb005f5 fix: Remove orphan members from inbox (#1797) 2021-02-18 15:56:54 +05:30
5daf970a87 chore: Generate nginx config using chatwoot installation scripts (#1687)
Co-authored-by: iriseden <iriseden@localhost.localdomain>
Co-authored-by: iriseden <ad.chabod@iriseden.eu>
2021-02-17 20:03:43 +05:30
Sivin VargheseandGitHub e9fb43c61e chore: Changes the mention tag design in the private note. (#1789) 2021-02-17 12:50:26 +05:30
2245233618 fix: the width of time stamp in notification. (#1791)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-02-17 12:35:00 +05:30
Sojan ec1ddc06fd Merge branch 'release/1.13.0' 2021-02-16 19:54:24 +05:30
Sojan 6154690c05 Bump version to 1.13.0 2021-02-16 19:52:35 +05:30
850041bc1d fix: Twitter inbox creation error (#1783)
fixes #1708

Co-authored-by: Pranav <pranav@chatwoot.com>
2021-02-16 19:35:10 +05:30
Nithin David ThomasandGitHub ac15f08995 Fix: Warning on new inbox page (#1784) 2021-02-16 19:29:35 +05:30
Pranav Raj SandGitHub ec557205f4 fix: Add validations dynamically for pre-chat form (#1779) 2021-02-16 15:15:37 +05:30
Pranav Raj SandGitHub 1706199a0e feat: Add pre_chat_form_settings in inbox settings page (#1776) 2021-02-16 00:58:57 +05:30
Sojan JoseandGitHub 3ade7d4445 chore: Fix push message tag error (#1768) 2021-02-16 00:15:45 +05:30
Pranav Raj SandGitHub 037ffc7419 feat: Add a pre-chat form on widget (#1769) 2021-02-16 00:14:13 +05:30
Sivin VargheseandGitHub 5f2bf7dfd2 Fix: link address overflow in webhook. (#1775) 2021-02-16 00:10:01 +05:30
Sivin VargheseandGitHub ee3ccbf0c8 fix: Fixes color for file name, file icon in private note. (#1772) 2021-02-15 23:53:52 +05:30
Sivin VargheseandGitHub c1a2f75509 Fix: Color for private note links (#1771) 2021-02-15 18:24:58 +05:30
Pranav Raj SandGitHub 64d7dc5335 fix: Remove teams on account user destroy (#1766) 2021-02-15 13:32:52 +05:30
Siddharth RameshandGitHub 27cf5ecdce chore: Include website_token key in the inboxes API response (#1765)
Many self-hosted instances require this key as a part of QA & maintenance. Since this key is not sensitive its better to send it as a part of the JSON response instead of having to use a regex to get it from the widget_script_tag
2021-02-15 13:08:15 +05:30
+1
Sojan JoseGitHubluiscperSin V (jiiniasu)AlguienSamathis-gavagaiYovan Lutfi Arya (Regerta)vfasoulasmagnusGoudarz Jafari (Goudarz)Pranav Raj S
84560953ea chore: Update translations (#1713)
Co-authored-by: luiscper
Co-authored-by: Sin V (jiiniasu)
Co-authored-by: AlguienSama
Co-authored-by: this-gavagai
Co-authored-by: Yovan Lutfi Arya (Regerta)
Co-authored-by: vfasoulas
Co-authored-by: magnus
Co-authored-by: Goudarz Jafari (Goudarz)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-02-13 15:37:06 +05:30
eaafc45f45 feat: Show teams on sidebar (#1754)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2021-02-13 14:58:05 +05:30
Sojan JoseandGitHub 8d45849d0c chore: Update notification Message Copy (#1685) 2021-02-12 22:56:12 +05:30
Pranav Raj SandGitHub 5defe648b5 chore: Bump rails to 6.0.3.5 (#1755) 2021-02-12 22:27:02 +05:30
Pranav Raj SandGitHub 9315cb81e8 feat: Use audio tag instead of download file button (#1749) 2021-02-11 17:26:14 +05:30
Pranav Raj SandGitHub d92a6a3078 feat: Show date along with time in messages (#1748) 2021-02-11 12:10:08 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Nithin David ThomasSojan Jose
a880845d2b chore: Bump marked from 1.2.7 to 2.0.0 (#1745)
Bumps [marked](https://github.com/markedjs/marked) from 1.2.7 to 2.0.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v1.2.7...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-02-10 23:29:04 +05:30
da94e65d20 fixed slack channel builder so that the channel list can have more th… (#1725)
fixed slack channel builder so that the channel list can have more than 100 elements

Co-authored-by: xinruiyang <xinruiyang@deepmap.ai>
2021-02-10 20:22:06 +05:30
1484849cc7 chore: Update method for team members (#1734)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-02-09 19:21:31 +05:30
Pranav Raj SandGitHub bf2b56a988 fix: Fix bot message rendering in dashboard (#1743) 2021-02-09 15:19:47 +05:30
Pranav Raj SandGitHub 88fd2c22d3 feat: Update select button styles to match button styles (#1742) 2021-02-08 18:27:20 +05:30
Pranav Raj SandGitHub df0d7262b4 fix: Show push notifications settings except Safari (#1741) 2021-02-08 16:39:15 +05:30
Pranav Raj SandGitHub d4c2a78db6 chore: Add Chatwoot SDK to Chatwoot Dashboard (#1726)
Add Chatwoot SDK to Chatwoot Dashboard
2021-02-08 16:38:35 +05:30
Sojan JoseandGitHub f46c4b5130 chore: Minor Changes to Bot Message APIs (#1739) 2021-02-08 12:50:11 +05:30
933661b22c feat: Save rich content editor state to user.uiSettings (#1736)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-02-07 12:54:32 +05:30
Pranav Raj SandGitHub 235e4325bc chore: Add error logging config on the vue package (#1670) 2021-02-06 12:59:19 +05:30
Nithin David ThomasandGitHub 19f7a2eda1 Ui minor fixes (#1735) 2021-02-05 23:24:50 +05:30
Pranav Raj SandGitHub 55982666b0 fix: Use encodeURIComponent in generating mention url (#1733) 2021-02-05 16:10:11 +05:30
Pranav Raj SandGitHub 351403457e fix: Use commonmarker instead of redcarpet (#1732) 2021-02-05 11:24:18 +05:30
Karthik SivadasandGitHub 2012aab1d5 fix: Standardize name validation on agent / profile pages (#1720) 2021-02-04 20:08:46 +05:30
6a614a520b chore: Sets up store for teams settings page (#1727)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-02-04 13:19:59 +05:30
Sojan JoseandGitHub c61edff189 feat: Add bulk imports API for contacts (#1724) 2021-02-03 19:24:51 +05:30
Pranav Raj SandGitHub 7748e0c56e fix: Update flaky notification tests (#1728) 2021-02-03 17:55:27 +05:30
Sojan JoseandGitHub 5d5e75ce9c Chore: Fix Deserialisation Error in Jobs (#1683)
- Ignore Jobs on de-serialization error
- Show empty conversations in chat UI
Fixes: #1480
2021-01-31 13:05:07 +05:30
Sojan JoseandGitHub 0ff81e3b53 feat: Add team assignment & filter APIs (#1712) 2021-01-31 12:40:02 +05:30
Pranav Raj SandGitHub b0563a666e feat: Add support for Clever cloud deployments (#1703) 2021-01-29 17:08:40 +05:30
Sojan JoseandGitHub f9c3b7f2f1 feat: Bulk add team members in Team APIs (#1695) 2021-01-29 12:34:52 +05:30
+9
Sojan JoseGitHubmagnus - NorwegianSina Nouri (sina.nouri) - PersianArnaud Dupont (dupont.arnaud.58) - FrenchIlya Konovalenko (ilyakonovalenko) - Russianlybtt - Chinese Simplifiedarturczyzewski - Polishvfasoulas - GreekThiago Costa Cavalcante (thiagolinocc) - Portuguese, BrazilianYovan Lutfi Arya (Regerta) - Indonesianchinyaev - Russianthis-gavagai - Nepalipetrs - CzechSin V (jiiniasu) - SwedishAmbler (ambler) - KoreanNestor Davalos (nestordavalos) - SpanishGoudarz Jafari (Goudarz) - PersianPranav
bf7915c8a3 chore: Update translations, Add Norwegian(no) (#1675)
Co-authored-by: magnus - Norwegian
Co-authored-by: Sina Nouri (sina.nouri) - Persian
Co-authored-by: Arnaud Dupont (dupont.arnaud.58) - French
Co-authored-by: Ilya Konovalenko (ilyakonovalenko) - Russian
Co-authored-by: lybtt - Chinese Simplified
Co-authored-by: arturczyzewski - Polish
Co-authored-by: vfasoulas - Greek
Co-authored-by: Thiago Costa Cavalcante (thiagolinocc) - Portuguese, Brazilian
Co-authored-by: Yovan Lutfi Arya (Regerta) - Indonesian
Co-authored-by: chinyaev - Russian
Co-authored-by: this-gavagai - Nepali
Co-authored-by: petrs - Czech
Co-authored-by: Sin V (jiiniasu) - Swedish
Co-authored-by: Ambler (ambler) - Korean
Co-authored-by: Nestor Davalos (nestordavalos) - Spanish
Co-authored-by: Goudarz Jafari (Goudarz) - Persian
Co-authored-by: Pranav <pranav@chatwoot.com>
2021-01-28 14:03:52 +05:30
freddiiandGitHub 229fcc18b7 chore: fixed typos in code comments (#1701) 2021-01-28 10:39:37 +05:30
b93388b330 feat: Tag agents in a private note (#1688)
Co-authored-by: Sojan <sojan@pepalo.com>
2021-01-27 00:04:11 +05:30
Pranav Raj SandGitHub b894b13e14 chore: Move docs to docs repository (#1694) 2021-01-26 16:43:45 +05:30
Pranav ecdeedf914 Merge branch 'master' into develop 2021-01-25 19:30:58 +05:30
Pranav dce719b5b1 chore: Release v1.12.2 2021-01-25 19:30:34 +05:30
Pranav f569f3a01e Merge branch 'hotfix/v1.12.2' into develop 2021-01-25 19:18:48 +05:30
Pranav c9285449fc Merge branch 'hotfix/v1.12.2' 2021-01-25 19:18:32 +05:30
Pranav 7878b9fbb9 fix: Use git instead of tarball for prosemirror-schema 2021-01-25 19:17:45 +05:30
c087e75808 feat: notification center (#1612)
Co-authored-by: Pranav <pranav@chatwoot.com>
2021-01-25 00:59:44 +05:30
Pranav Raj SandGitHub e75916d562 chore: Move Canned Responses list to a separate component (#1681) 2021-01-23 14:07:01 +05:30
Sojan JoseandGitHub d64ba1df8b chore: Add seeds for Bot Messages (#1676) 2021-01-22 01:01:02 +05:30
Sojan JoseandGitHub bba296b5c6 chore: update identity verification docs (#1677) 2021-01-21 11:27:34 +05:30
kgdevandGitHub b4a547e0ae fix: Incorrect Scoping in Contact API (#1674) 2021-01-19 19:48:15 +05:30
Pranav Raj SandGitHub 12491fa8d5 feat: Add "Enter to send" option on format mode (#1671) 2021-01-19 19:28:40 +05:30
Sojan 2ff0af3c8d Merge branch 'release/1.12.1' into master 2021-01-19 16:52:05 +05:30
Sojan 0f313875f7 Bump version to 1.12.1 2021-01-19 16:51:11 +05:30
Sojan JoseandGitHub f36af7a7de chore: Fix db:prepare error in deployments (#1668)
Fixes #1667
2021-01-19 16:47:25 +05:30
Pranav Raj SandGitHub 114f00b88a fix: Avoid list-style none in message-content (#1665) 2021-01-19 01:05:15 +05:30
Sojan 1aaced3027 Merge branch 'release/1.12.0' into master 2021-01-18 14:17:44 +05:30
Sojan f50cecf865 Bump version to 1.12.0 2021-01-18 14:13:57 +05:30
Sojan JoseGitHubPranavAlguienSamaScarlett Bidun (scarlettbidun)Sin V (jiiniasu)Diego Vieira (diego-vieira)vfasoulasYovan Lutfi Arya (Regerta)arturczyzewski
b4ef6f64be chore: Update translations (#1661)
Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: AlguienSama
Co-authored-by: Scarlett Bidun (scarlettbidun)
Co-authored-by: Sin V (jiiniasu)
Co-authored-by: Diego Vieira (diego-vieira)
Co-authored-by: vfasoulas
Co-authored-by: Yovan Lutfi Arya (Regerta)
Co-authored-by: arturczyzewski
2021-01-18 12:36:26 +05:30
13073629bb feat: Enable Markdown Parsing in emails (#1663)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-18 11:43:31 +05:30
54f15b73d3 feat: Markdown editor support (#1657)
Co-authored-by: Pranav <pranav@chatwoot.com>
2021-01-18 11:20:19 +05:30
58fad2561d chore: Standardize button element (#1633)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-18 00:54:20 +05:30
Pranav Raj SandGitHub cd7f17f280 chore: Update homebrew installation command (#1662) 2021-01-18 00:09:43 +05:30
Pranav Raj SandGitHub ba06fe1cb2 feat: Update notification in account settings (#1660) 2021-01-17 23:59:09 +05:30
a0c33254e7 feat: Team APIs (#1654)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-17 23:56:56 +05:30
dd90e24d02 chore: Add unread notification count API (#1646)
Co-authored-by: Sojan <sojan@pepalo.com>
2021-01-17 22:45:31 +05:30
b6e8173b24 feat: HMAC verification for web widget (#1643)
* feat: HMAC verification for web widget. Let you verify the authenticated contact via HMAC on the web widget to prevent data tampering.
* Add docs for identity-validation

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-17 22:44:03 +05:30
d758df8807 fix: Add correct thread message_id to the email message (#1659)
Co-authored-by: Sojan <sojan@pepalo.com>
2021-01-17 22:43:32 +05:30
14eefe3824 feat: Add Installation onboarding flow (#1640)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-17 14:07:18 +05:30
a5c3c4301c feat: Add support for markdown in messages (#1642)
Co-authored-by: Pranav <pranav@chatwoot.com>
2021-01-15 14:40:50 +05:30
Sony MathewandGitHub 5adbc84e0c feat: Remove un-necessary lock attribute in config (#1656) 2021-01-15 13:49:56 +05:30
Sony MathewandGitHub 18d3c40fb3 feat: installation config in super admin console (#1641)
* feat: installation config in super admin console

* Added the ability for super admins to view, edit and update
installation config values. Also they can add new isntallation config
values. The impact of editing and adding depends on which all
installation config values are being used in the code.
* Known limitation now: Ability to edit hash values (for eg: feature
flags) are disabled. This requires more work and will be taken up in
a secondary set of changes.
* Minor UX improvement. Clicking on the Sidekiq option in the super
admin siebar will now open the sidekiq dashboard in a new tab rather
than in the same tab that you were using super admin.

* fix: method name fix in custom adminsitrate field

* feat: added locked attribute to global config
* Added the locked attribute to instalaltion config table. Added
necessary migrations. Added changes in config loader.
* Added the changes on the installation config yml
* Locked the account feature defaults in code

* feat: show only editable configs in admin console
* Added a new scope in installation config model
* Added scope in adminstrate controller for installation_config

* fix: new installation config create error
* Fixed the error in new installation config create

* fix: specs coverage
* Added specs for installation config super admin controller

* chore: update git ignore with encrypted config ext
2021-01-15 13:21:53 +05:30
Sojan JoseandGitHub 2e19de5d01 chore: Update Contact Inbox create API documentation (#1650) 2021-01-14 20:36:04 +05:30
Sojan JoseandGitHub 7542330d61 feat: Add Platform APIs (#1456) 2021-01-14 20:35:22 +05:30
Pranav Raj SandGitHub 75c2a7cb2f fix: Resolve name only if assignee exists during unassignment (#1649) 2021-01-14 14:21:41 +05:30
Suhavi SandhuandGitHub dad737021f Adds character count to reply box 😳 (#1634)
* Added characters remaining to reply box

* Changed warning text for character length

* Decreased font size of message
2021-01-13 19:16:45 +05:30
fd181f18a1 feat: Update reply box UI 👀 (#1623)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-13 18:06:25 +05:30
Muhsin KelothandGitHub 2d5aa9d3bd chore: Add count and current page in notification meta details (#1619) 2021-01-13 17:04:27 +05:30
Pranav Raj SandGitHub 8c66dbd342 fix: Labels cannot be added to conversations (#1644) 2021-01-13 12:15:11 +05:30
764c90174e feat: Improve sidebar UI, add emoji icons instead of ionicons (#1605)
Co-authored-by: Pranav <pranav@chatwoot.com>
2021-01-12 14:45:10 +05:30
Sojan JoseandGitHub 346830ab1d feat: Add Cron Jobs In Chatwoot and update installation notice (#1630) 2021-01-11 17:34:41 +05:30
Pranav Raj SandGitHub 160a6fc6cf feat: Save UI state in the database (#1635)
feat: Save UI state in the database
2021-01-10 19:25:33 +05:30
37d8e1c9a0 chore: Update translations, enable Swedish (#1628)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Sin V (jiiniasu)
2021-01-09 13:29:02 +05:30
Pranav Raj SandGitHub a9344fbf4c fix: Add missing switch_locale on DashboardController (#1631) 2021-01-09 01:43:17 +05:30
Pranav Raj SandGitHub df27aab959 fix: Include missing file for labels (#1629) 2021-01-08 21:01:45 +05:30
Sojan JoseandGitHub 7884090551 chore: Enable updating conversation additional attributes (#1611)
- Enable updating additional attributes via conversation API
- Handle the case when additional_attributes is nil

Fixes: #1357
2021-01-07 13:47:38 +05:30
Nithin David ThomasandGitHub 64b0d48dbf Add shadow utility variables (#1620) 2021-01-06 22:54:36 +05:30
Pranav Raj SandGitHub 03487019b6 chore: Add steps to enable inbound_emails in the account (#1614) 2021-01-06 18:16:38 +05:30
3d2db95417 feat: Add preview for attachment messages (#1562)
Add preview for pending messages and attachments

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-06 17:56:29 +05:30
Sojan JoseandGitHub db189e3c26 chore: Sync the schema and migrations (#1610) 2021-01-06 11:36:45 +05:30
627d3a575a chore: Automate conversation display_id generation with db triggers (#1412)
Automate conversation display_id generation with db triggers

Co-authored-by: Saurabh Mehta <saurabh1.mehta@airtel.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2021-01-05 20:07:04 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
45059b6fe9 chore: Bump axios from 0.19.2 to 0.21.1 (#1603)
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-05 13:10:03 +05:30
Pranav Raj SandGitHub b49ce6b624 security: Update azure-storage-blob to fix nokogiri security issue (#1602) 2021-01-05 12:55:28 +05:30
Pranav Raj SandGitHub 1266f0ab8c feat: Add link to the Twitter profile of the sender (#1597) 2021-01-05 10:06:40 +05:30
Pranav Raj SandGitHub a2d6fa0f74 feat: API to add label to contacts (#1563) 2021-01-03 20:07:57 +05:30
Pranav Raj SandGitHub ea08fbcac4 chore: Update license year and company name (#1575) 2021-01-03 19:56:06 +05:30
8b7e43bdbb fix: Remove Twitter links rendered in messages (#1570)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2020-12-31 19:17:00 +05:30
Pranav Raj SandGitHub d35ce1b868 fix: Update listen gem (#1569) 2020-12-31 19:00:03 +05:30
Sojan JoseGitHubPranav Raj SYovan Lutfi Arya (Regerta)Goudarz Jafari (Goudarz)korhovfasoulas
7672e49148 chore: Update translations (#1561)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Yovan Lutfi Arya (Regerta)
Co-authored-by: Goudarz Jafari (Goudarz)
Co-authored-by: korho
Co-authored-by: vfasoulas
2020-12-29 13:18:22 +05:30
Pranav Raj SandGitHub 811657c9e7 feat: API to allow agents to delete a message (#1353) 2020-12-28 23:36:50 +05:30
Pranav Raj SandGitHub 08f1e0eb32 chore: Add docs about GCS Storage (#1560) 2020-12-28 23:15:45 +05:30
Pranav Raj SandGitHub 99125d3b9c chore: Add limitations section to Heroku (#1559) 2020-12-28 21:24:38 +05:30
4a9e665f94 chore: Use font subsetting for Inter (#1553)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2020-12-27 20:24:04 +05:30
Pranav Raj SandGitHub bde323ffaf chore: Remove Ionicons TTF references (#1554) 2020-12-27 20:12:08 +05:30
Nithin David ThomasandGitHub 56280eaf35 chore: Remove beta tag from sidebar name (#1552) 2020-12-26 11:18:56 +05:30
Nithin David ThomasandGitHub 7c62d3629c feat: Add pending message on dashboard (#1547) 2020-12-25 13:15:01 +05:30
3e61ea5cfa feat: Change the date format display in widget (#1528)
Co-authored-by: Pranav <pranav@chatwoot.com>
2020-12-24 18:53:47 +05:30
+5
Sojan JoseGitHubPranavAlguienSamaYovan Lutfi Arya (Regerta)FrederikAmbler (ambler)Hossein Sadeghi (ssageghi)korhovfasoulasThiago Ramos (thiago)Ehab hakawati (ehab.hakawati)Karl Marx (taylanguney)Fernando Sousa (Fernando)Matt (duartemvix)
677f56f802 chore: Update translations (#1536)
Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: AlguienSama
Co-authored-by: Yovan Lutfi Arya (Regerta)
Co-authored-by: Frederik
Co-authored-by: Ambler (ambler)
Co-authored-by: Hossein Sadeghi (ssageghi)
Co-authored-by: korho
Co-authored-by: vfasoulas
Co-authored-by: Thiago Ramos (thiago)
Co-authored-by: Ehab hakawati (ehab.hakawati)
Co-authored-by: Karl Marx (taylanguney)
Co-authored-by: Fernando Sousa (Fernando)
Co-authored-by: Matt (duartemvix)
2020-12-22 18:01:10 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fe6571c3ff chore: Bump node-notifier from 8.0.0 to 8.0.1 (#1538)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-22 16:17:01 +05:30
Pranav Raj SandGitHub 9d3dda9a61 feat: Add full name to the user signup form (#1534) 2020-12-21 14:05:19 +05:30
Muhsin KelothandGitHub 796e376fa7 feat: Add smart app banner in website for iOS (#1531) 2020-12-20 11:52:40 +05:30
Muhsin KelothandGitHub f3f2542bae fix: Update agent select placeholder translation (#1533) 2020-12-20 11:51:20 +05:30
Pranav Raj SandGitHub 8e2b4acc43 chore: Remove account.destroy listener (#1530) 2020-12-19 18:11:43 +05:30
Muhsin KelothandGitHub 090b716ec1 chore: Fix translation link in readme (#1525) 2020-12-18 12:42:14 +05:30
Nithin David ThomasandGitHub dd3d91c67e feat: Add link for "intitated from" in sidebar (#1523) 2020-12-18 01:19:44 +05:30
Sojan fa883a2780 Merge branch 'release/1.11.1' into master 2020-12-16 15:34:10 +05:30
Sojan a214372c7c Bump version to 1.11.1 2020-12-16 15:32:44 +05:30
Pranav Raj SandGitHub 50f87f373e fix: Use empty object if additional_attribute is null (#1520) 2020-12-16 15:11:53 +05:30
Sojan 6373e6dec8 Merge branch 'release/1.11.0' into master 2020-12-16 00:40:19 +05:30
Sojan 49a12bd560 Bump version to 1.11.0 2020-12-16 00:39:02 +05:30
Sojan JoseandGitHub 610142c1b8 chore: Enable Korean (ko) (#1514) 2020-12-16 00:35:40 +05:30
Pranav Raj SandGitHub ac7fdaa997 chore: Add documentation for Maxmind geocoder setup (#1518) 2020-12-16 00:32:05 +05:30
Pranav Raj SandGitHub 0619894560 feat: Download Agent wise report (#1517) 2020-12-15 23:35:03 +05:30
Pranav Raj SandGitHub e6f7f5530b chore: Fix i18n_key for apps (#1516) 2020-12-15 16:32:13 +05:30
Pranav Raj SandGitHub faafdc3bf8 chore: Add missing label to locale file (#1513) 2020-12-15 01:24:56 +05:30
Pranav Raj SandGitHub f0fd93bfea chore: Update Mac OS setup guide (#1512) 2020-12-15 01:17:17 +05:30
Pranav Raj SandGitHub edb09d5a9c chore: Improve location display in sidebar (#1509)
- Log IP Address on widget load
- Save country code to contact
2020-12-13 22:23:56 +05:30
Pranav Raj SandGitHub 060ef4a427 chore: Add steps for copying targets in linux VM (#1508) 2020-12-12 13:25:28 +05:30
f9bd447912 chore: Upgrade vue-i18n to 8.x (#1383)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-12-12 12:08:36 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7f2f984bea chore: Bump ini from 1.3.5 to 1.3.7 (#1507)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-12 00:01:14 +05:30
Pranav Raj SandGitHub 1ade4f75ea chore: Ingore case while searching contact name, email (#1505) 2020-12-11 23:25:00 +05:30
Pranav Raj SandGitHub b6ca77158c fix: Limit the number of unread messages returned in the API (#1504) 2020-12-10 23:30:38 +05:30
Pranav Raj SandGitHub 88c4b63eec chore: Add slack external_source_id for outgoing messages (#1503) 2020-12-10 22:53:49 +05:30
Sojan JoseandGitHub 1f02c09a41 chore: Setup dev env with Github Codespaces [alpha] (#1282)
Easily spin up a Chatwoot development environment with Github Codespaces.
2020-12-09 17:01:28 +05:30
Sojan JoseGitHubPranav Raj SreepuramYovan Lutfi Arya (Regerta)Matt (duartemvix)vfasoulasFernando Sousa (fernando)korho
e07ecd547b chore: Update translations (#1502)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
Co-authored-by: Yovan Lutfi Arya (Regerta)
Co-authored-by: Matt (duartemvix)
Co-authored-by: vfasoulas
Co-authored-by: Fernando Sousa (fernando)
Co-authored-by: korho
2020-12-09 16:43:51 +05:30
Pranav Raj SandGitHub 70002afc60 chore: Move missing text to translation files (#1501) 2020-12-08 23:31:25 +05:30
Pranav Raj SandGitHub 870a24126e fix: Display assignee only if the assignee has access to the account (#1500) 2020-12-08 22:49:47 +05:30
Sojan JoseGitHubPranav Raj SreepuramMichael (msmits2011)pixpackvfasoulaskorhoYovan Lutfi Arya (Regerta)
2880f4942a chore: Enable Finnish, Indonesian languages (#1495)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
Co-authored-by: Michael (msmits2011)
Co-authored-by: pixpack
Co-authored-by: vfasoulas
Co-authored-by: korho
Co-authored-by: Yovan Lutfi Arya (Regerta)
2020-12-08 00:05:07 +05:30
Pranav Raj SandGitHub 594871ed96 chore: Fix translation issues (#1494) 2020-12-07 20:11:27 +05:30
Pranav Raj SandGitHub 94c231366a feat: Allow only image, pdf, audio, video, csv on file uploader (#1492) 2020-12-07 13:48:41 +05:30
Pranav Raj SGitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c87cdf25c5 chore: Upgrade highlight.js to 10.4.1 (#1483)
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.5 to 10.4.1.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.5...10.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-05 01:22:16 +05:30
Pranav Raj SandGitHub 5e190aad3c fix: Check if the argument is an empty string (#1474) 2020-12-05 00:56:33 +05:30
mike9011andGitHub e1d4584770 chore: Fix widget translation for nl (#1478) 2020-12-04 01:26:24 +05:30
Pranav Raj SandGitHub af2fb1b146 fix: Add worker to the formation (#1470) 2020-12-01 14:56:05 +05:30
Sojan JoseGitHubPranav Raj SreepuramАлексей Чертановскийcanbaran011Jonáš Loskot (Fjuro)wanhai huangMatt (duartemvix)chinyaevKarl Marx (taylanguney)
a5ceddc454 chore: Enable Czech(cs), Turkish(tr), update translations (#1466)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
Co-authored-by: Алексей Чертановский
Co-authored-by: canbaran011
Co-authored-by: Jonáš Loskot (Fjuro)
Co-authored-by: wanhai huang
Co-authored-by: Matt (duartemvix)
Co-authored-by: chinyaev
Co-authored-by: Karl Marx (taylanguney)
2020-12-01 13:15:17 +05:30
Pranav Raj SandGitHub 64733ca3bc fix: Move integration text to translation file (#1463)
- Move integration text to translation file
- Split switch_locale
2020-11-30 16:24:54 +05:30
Nithin David ThomasandGitHub d51c5d5768 chore: Add click interaction for conversation list (#1460) 2020-11-29 13:28:36 +05:30
Pranav Raj Sreepuram bb31b21060 Merge branch 'master' into develop 2020-11-27 14:43:02 +05:30
Tim CowlishawandGitHub d5a126745e fix: GCS credentials dont need to be parsed as JSON (#1429) 2020-11-27 14:39:25 +05:30
Tristan RoscoeandGitHub 88f5f825b7 fix: Add branch variable to Linux VM setup script (#1462) 2020-11-27 13:37:57 +05:30
Pranav Raj SandGitHub f397c0c087 chore: Send typing events on keyup, not on focus (#1461) 2020-11-27 00:17:55 +05:30
a988724c91 feat: Authenticate by SSO tokens (#1439)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-25 13:59:38 +05:30
Vishal PandeyandGitHub cb2a528be6 fix: Label overflow using text-truncate (#1448) 2020-11-25 12:52:39 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Pranav Raj Sreepuram
34c1091d55 chore: Bump highlight.js from 9.18.1 to 9.18.5 (#1453)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-25 12:50:34 +05:30
Sojan JoseGitHubSamuel Rasmussenwanhai huangMattPetteri PucilowskiАлексей Чертановский@vfasoulasGoudarz Jafari
d88118e8d5 chore: Enable Danish language (#1443)
Co-authored-by: Samuel Rasmussen
Co-authored-by: wanhai huang
Co-authored-by: Matt
Co-authored-by: Petteri Pucilowski
Co-authored-by: Алексей Чертановский
Co-authored-by: @vfasoulas
Co-authored-by: Goudarz Jafari
2020-11-24 23:07:51 +05:30
30802e0c13 feat: Ability to set installation-wide default locale (#1433)
* Dashboard locale can be set via env variable
* Change account locale based on registration page
* Set account locale if available

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-24 18:34:31 +05:30
Adam ZyskoandGitHub dffc888f9c feat: Create superadmin in seeds (#1442)
Create SuperAdmin in seeds scripts except on production
2020-11-24 11:22:18 +05:30
Vishal PandeyandGitHub 942d1fd0af feat: Search contacts using phone number (#1440) 2020-11-23 11:00:07 +05:30
Pranav Raj SandGitHub 4fe29fefb4 fix: Add missing close button if bubble is hidden (#1435) 2020-11-23 10:49:28 +05:30
fcf91f60fb chore: Remove invalid quotes in Dockerfile instructions (#1431)
Co-authored-by: hiaselhans <simon.klemenc@gmail.com>
2020-11-22 21:50:56 +05:30
Pranav Raj SandGitHub be2d3ea124 fix: Update agent list when the user changes their presence (#1436) 2020-11-21 22:43:27 +05:30
Adam ZyskoandGitHub 61d26f71c1 chore: bump ruby from 2.7.1 to 2.7.2 (#1426)
Closes:  #1399
2020-11-20 15:38:13 +05:30
Pranav Raj SandGitHub 29bd05ccfb chore: Add documentation on translation process (#1424) 2020-11-18 15:27:50 +05:30
Pranav Raj Sreepuram c40ba0d3dd Bump version to 1.10.0
Signed-off-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-17 15:35:37 +05:30
Sojan d5dff3c710 Merge branch 'release/1.10.0' into master 2020-11-17 11:45:30 +05:30
Pranav Raj SandGitHub 3ee453c01e fix: Avoid keys getting translated in availability (#1418) 2020-11-17 10:39:46 +05:30
Pranav Raj SandGitHub 2d70131097 fix: Remove duplicate API calls for conversation (#1419) 2020-11-17 09:15:57 +05:30
Sojan JoseandGitHub 9d2542eecd chore: Enable Japanese, update translation from Crowdin (#1417) 2020-11-16 23:11:14 +05:30
481baa32ba chore: Use translated text in the language menu (#1377)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-16 20:39:52 +05:30
மனோஜ்குமார் பழனிச்சாமிandGitHub f4facee8d8 chore: Update text on PR template, inboxMgmt.json (#1410) 2020-11-16 19:50:32 +05:30
Sojan JoseandGitHub eb2ded6f65 feat: Agent & Inbox Report APIs (#1391) 2020-11-16 19:41:52 +05:30
Pranav Raj SandGitHub faaed17418 fix: Fire query only if search term is available (#1413) 2020-11-16 13:08:36 +05:30
Pranav Raj SandGitHub ef99fd3311 feat: Ignore tweets from blocked users (#1408) 2020-11-16 10:46:53 +05:30
Sojan JoseandGitHub 563da0e052 feat: Use gravatar URL for contacts and users if no image available (#1407) 2020-11-13 19:56:30 +05:30
Nithin David ThomasandGitHub f275cf8809 chore: Remove duplicate CSS property (#1404) 2020-11-13 00:18:12 +05:30
Pranav Raj SandGitHub 5c3de5e095 fix: Enhance CRM UI (#1397)
* feat: Sort by name
* feat: Fetch labels from sidebar
* Remove unused language file
* Add beta tag to contacts
* Add timeMixin, reduce font-size
* Remove unused methods
* Remove unused prop
* Disabled footer if no contacts or invalid page
* Add keyup for input
* Fix conversation not loading if there are no active conversations
* return last_seen_at as unix time
* Fix contact edit modal
* Add loader for edit contact button
* Fix review comments
2020-11-11 16:02:14 +05:30
David SteinbauerandGitHub 32fce96503 chore: Update DE translation (#1393) 2020-11-11 10:51:25 +05:30
f214c9c47c feat: Add Contacts page (#1335)
Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-10 15:25:26 +05:30
Pranav Raj SandGitHub 2babfd6148 fix: Add a check for thread_ts (#1389)
- If no thread timestamp is available, ignore the message
- Add specs to cover the case
2020-11-09 22:01:57 +05:30
7718cf7d2c feat: Add global message search (#1385)
* feat: Search messages by content

* Fix search UI

* Add specs

* chore: Filter search results

* Update highlight logic

* Rename query to searchTerm

Co-authored-by: Sojan <sojan@pepalo.com>
2020-11-08 01:46:45 +05:30
Sivin VargheseandGitHub 22683cae66 feat: Sort labels on sidebar by alphabetical order (#1387) 2020-11-07 12:21:34 +05:30
Sony MathewandGitHub 39c2270227 fix: pg pass printed by docker container (#1382)
* fix: pg pass printed by docker container (#1371)

The "POSTGRES_PASSWORD" variable setting inside the entrypoint script
of the rails docker container was printed in the logs when the
container was run using docker compose.

Fixed this by removing this password being set in this script.
Added env file from root directory to the container
Updated the tailwind evrsion in yarn lock

* fix: moved pg database url check in the entrypoint to another helper

created a new helper docker/entrypoints/helpers/pg_database_url.sh
to parse the databse url and export the postgres host, user and
port.

With this the pg is_ready check falls to a common format rather
than two formats depending on DATABASE_URL env variable is
present or not.

* fix: rename pg ready variable in rails entrypoint
2020-11-06 00:06:07 +05:30
Muhsin KelothandGitHub afa234a207 feat: Add status color for items in availability status menu (#1380) 2020-11-04 12:23:44 +05:30
Akash SrivastavaandGitHub 074084b258 feat: Auto resolve conversations after n days of inactivity (#1308)
fixes: #418
2020-11-01 12:53:25 +05:30
Adam ZyskoandGitHub 65ed4c78a4 feat: Business hours
Data models and APIs for business hours

ref: #234
2020-11-01 00:14:33 +05:30
Pranav Raj SandGitHub 3d64ba49fc chore: Upgrade tailwindcss to 1.9.x (#1376) 2020-10-31 15:32:55 +05:30
Yih YangandGitHub 12b7358773 feat: Add messages on mute / unmute actions (#1373) 2020-10-30 22:27:25 +05:30
Nico385412andGitHub 84ce0a9054 fix: Make the bubble text not selectable (#1294) 2020-10-30 12:06:51 +05:30
RicardoandGitHub 85738f6408 Added missing keywords (#1365) 2020-10-28 02:14:58 +05:30
Sojan JoseandGitHub 1d9debaee0 feat: IP lookup (#1315)
- 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
2020-10-28 02:14:36 +05:30
AbhishekandGitHub ff96d43953 feat: notify on slack disconnect (#1323) 2020-10-28 00:22:57 +05:30
Hiroshi SHIBATAandGitHub 9045b8d9ca chore: Fixed typos (#1369) 2020-10-27 20:22:55 +05:30
Pranav Raj SandGitHub d0f2ed38c1 fix: Add lib/azure to autoload ignore list (#1368) 2020-10-27 18:48:23 +05:30
Sojan JoseandGitHub 46098f2970 chore: Monkey patch Azure Storage Service (#1366)
Monkey patch azure storage service until the changes come into rails stable versions
2020-10-26 00:31:19 +05:30
Pranav Raj SandGitHub fa864cc9ee fix: Add a full width image view to fix resolution issues (#1363) 2020-10-26 00:28:23 +05:30
Pranav Raj SandGitHub 54214c73aa fix: Update production installation setup script for Ubuntu 20.04 (#1364)
Setup script for Ubuntu 20.04

Fixes: #1364
2020-10-25 22:40:13 +05:30
Adam ZyskoandGitHub f38f778091 chore: Add translation text for PL in the widget (#1360) 2020-10-23 12:33:39 +05:30
Pranav Raj SandGitHub b9be43b276 fix: Add compact type, fix spacing in contact panel (#1352)
* fix: Add compact type, fix spacing in contact panel

* Set padding-top, padding-bottom
2020-10-21 15:18:36 +05:30
Pranav Raj SandGitHub 552df63621 fix: Show File Upload for API Inbox (#1356) 2020-10-21 13:03:04 +05:30
Ronald WalkerandGitHub cbe9e06472 chore: DRY up check_authorization method (#1351) 2020-10-20 19:22:21 +05:30
Sojan JoseandGitHub bbef03edea chore: Update documentation for inbound email service (#1354) 2020-10-20 18:35:40 +05:30
Sojan cf7271ecfb Merge branch 'release/1.9.0' into master 2020-10-20 12:32:57 +05:30
Sojan c7402c6c3f chore: Bump up version to 1.9.0 2020-10-20 12:31:16 +05:30
Muhsin KelothandGitHub 9e3b0f0731 fix: name and email address overflow issue in customer side panel (#1348)
* Complete name and email address overflow  issue

* Changes as per review

* Code cleanup
2020-10-19 14:57:16 +05:30
Pranav Raj SandGitHub 85514cae8d feat: Display reply time in widget (#1349)
Fixes #1132
2020-10-18 23:32:22 +05:30
RicardoandGitHub bd11b2ec58 chore: Update Spanish translation (#1342) 2020-10-17 16:02:08 +05:30
Jon EvansandGitHub 62b4ce2be1 fix: Improve mobile styles for registration view (#1344) 2020-10-16 22:05:07 +05:30
Pranav Raj SandGitHub 666948b809 chore: Reduce the click area on Branding (#1340) 2020-10-15 00:11:47 +05:30
Pranav Raj SandGitHub 0bea0217b4 chore: Use full name in activity message, fix specs (#1339) 2020-10-14 00:16:35 +05:30
Pranav Raj Sreepuram 4a2a309d18 Use name instead of display_name in the dashboard 2020-10-13 13:03:55 +05:30
Pranav Raj SandGitHub 2c324d9421 feat: Allow custom email address for inbox (#1336) 2020-10-11 23:24:11 +05:30
Pranav Raj SandGitHub 58c0792920 fix: Remove duplicate message in slow networks (#1332) 2020-10-11 20:24:26 +05:30
Sojan JoseandGitHub 59bee66e63 chore: Handle exceptions on external URL calls (#1334) 2020-10-11 20:22:21 +05:30
7d409321e9 fix: Truncate long label names in the sidebar (#1309)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-10-10 22:40:11 +05:30
Pranav Raj SandGitHub 3bb2d27646 chore: Use agent partial instead of user in conversation API (#1333) 2020-10-10 21:57:09 +05:30
Sojan JoseandGitHub f11d7fe992 chore: Block Search bots from rendering widget (#1331)
Search bots trying to render the widget ends up throwing errors.
2020-10-10 11:48:31 +05:30
5d5d2f9779 chore: Update contribution guidelines (#1326)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-10-09 14:08:43 +05:30
Sony MathewandGitHub e01fdb5f00 chore: refactored redis config (sentinel related) (#1327)
Refactored the redis config module which had redis sentinel related
configs. Also changed the specs accordingly.
2020-10-09 12:37:42 +05:30
Sony MathewandGitHub b1a8430258 fix: Security: CVE-2020-8264 (#1328) (#1329)
* fix: Security: CVE-2020-8264 (#1328)

* fix: Upgraded rails version to 6.0.3.4 for Security: CVE-2020-8264
* Fixed a rubocop linter issue with string inetrpolation also.
2020-10-09 11:33:51 +05:30
Dmitriy ShcherbakanandGitHub ecebe163e1 feat: Ability to unmute muted conversations (#1319) 2020-10-08 12:02:08 +05:30
Vishal PandeyandGitHub 2aad33a5be Bugfix: Integrations page is broken on safari (#1320)
Fixes #1196
2020-10-07 22:02:08 +05:30
Pranav Raj SandGitHub db1953de24 fix: Add default 404 param on gravatar (#1316) 2020-10-05 23:31:23 +05:30
Sojan JoseandGitHub 88b2469dc8 feat: Add API to get the active contacts (#1313) 2020-10-05 23:30:27 +05:30
Pranav Raj SandGitHub 11725de09a chore: Enable Vietnamese in languages (#1314) 2020-10-05 22:53:24 +05:30
399f9e004a fix: Use last_activity_at instead of updated_at for sorting (#1281)
Co-authored-by: Akash Srivastava <akash.srivastava.1911@gmail.com>
2020-10-05 22:52:43 +05:30
ı ɑɷ ɖεɾεƙandGitHub ee119b2174 chore: Update translation for vietnamese (#1312) 2020-10-05 19:55:18 +05:30
Sojan JoseandGitHub e44afa03f3 chore: Prevent i18n config bleeding across requests (#1214) 2020-10-05 17:55:46 +05:30
AbhishekandGitHub 77d380dd6b chore: refactor redis config (#1310)
- refactor Redis config in Redis::Config Module
-  unit tests for Redis::Config module
2020-10-05 17:31:10 +05:30
Narendran KannanandGitHub 1e1300c9d2 fix: Add word break for files with long name (#1306) 2020-10-05 13:23:38 +05:30
SarawutKlandGitHub df527088e9 fix: Replace Whatsapp inbox icon (#1311) 2020-10-04 22:57:11 +05:30
ArmanandGitHub 3d379b071d feat: use gravatar if no avatar image (#1307)
Fixes:  #1240
2020-10-04 16:25:22 +05:30
AbhishekandGitHub 807f79ef5d feat: support for Redis sentinel (#1301)
closes: #925
2020-10-03 15:24:33 +05:30
Zero KingandGitHub db4997c07f fix: Array length check (#1300) 2020-10-03 14:07:50 +05:30
AbhishekandGitHub 70f08103aa feat: Activity message for label addition & deletion (#1291)
Fixes: #1022
2020-10-02 16:33:59 +05:30
Dmitriy ShcherbakanandGitHub 98cb09104e chore: Refactor DeviseOverrides::ConfirmationsController#create (#1297) 2020-10-02 15:27:26 +05:30
b81eef6ffd chore: Add translation for Vietnamese (#1292)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-10-02 11:28:15 +05:30
127ffda762 feat: Change availability status from sidebar (#1288)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-10-02 11:16:12 +05:30
Jonathan ComoandGitHub f61b731fb3 fix: Call hasUserKeys() on user argument (#1295) 2020-10-02 10:17:12 +05:30
AbhishekandGitHub 5cd08b3f98 chore: self-assign conversation activity message (#1293) 2020-10-02 00:41:23 +05:30
Sojan JoseandGitHub b862817b29 feat: Enable reauthorization for Facebook (#1286) 2020-09-30 01:12:32 +05:30
Pranav Raj SandGitHub 99ca54fd3c fix: Remove keys for reports from translation file (#1279) 2020-09-27 18:56:52 +05:30
Pranav Raj SandGitHub dbd1720aeb chore: Add a check for data diff in setUser call (#1272) 2020-09-26 22:33:20 +05:30
701eccb35c Feature: Knowledge Base APIs (#1002)
- 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>
2020-09-26 02:32:34 +05:30
David SteinbauerandGitHub 4b27ac63d4 chore: Add widget text translations for German (#1276) 2020-09-25 21:36:31 +05:30
Pranav Raj SandGitHub d6ada922c8 chore: Fix wrong documentation to set a label (#1269) 2020-09-24 23:20:25 +05:30
Sojan JoseandGitHub 532331edb6 feat: Ability to search conversation with message content (#1265)
- API end point which takes message content as search parameter
- end point supports additional filtering with labels and inbox ids
- swagger doc
2020-09-23 15:27:41 +05:30
Pranav Raj SandGitHub bc8becf49c chore: Update website-sdk documentation (#1267)
Update the `website-sdk` documentation to reflect the feedback on setUser method from a customer
2020-09-23 15:27:11 +05:30
17e5c01948 chore: Update zh_TW i18n files (#1262)
Co-authored-by: JackTsai <jacktsai@larvata.tw>
2020-09-22 19:16:00 +05:30
Sony MathewandGitHub 381c448627 fix: Email encoding issue - utf8 (#1264)
There were issues in parsing Arabic or UTF characters (emojis)
correctly for the incoming emails.

All these characters were converted to question marks which is
teh fallback character when an encoding is enforced and there is
a missing matching character.
2020-09-22 11:26:41 +05:30
Sony MathewandGitHub f9b0427751 feat: email channel backend (#140) (#1255)
* 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
2020-09-21 22:44:22 +05:30
Vishal PandeyandGitHub 313b2da703 bugfix: fix file uploads not showing original file name
fixes: #1246
2020-09-21 18:42:30 +05:30
Pranav Raj SandGitHub ea6577af6d fix: Remove agent keys from translation file (#1261) 2020-09-20 22:19:34 +05:30
Pranav Raj SandGitHub 0deb1af852 chore: Add a check for defined labels in SDK API (#1259) 2020-09-20 19:29:39 +05:30
Pranav Raj SandGitHub cdd428f503 chore: Add browser logs and server logs to the template (#1260) 2020-09-20 19:10:08 +05:30
Sony MathewandGitHub fc7b84d612 Chore: Fix N+1 queries in dashboard side (#1254)
* Chore: Fix N+1 queries in dashboard side

Fixed a couple of N+1 queries fired on the dashboard side of
the app to improve performance.
2020-09-19 12:46:34 +05:30
Sojan JoseandGitHub 74d07c876e chore: Fix RestClient::GatewayTimeout, label_list of NilClass (#1243) 2020-09-18 18:50:53 +05:30
Pranav Raj SandGitHub 646746aa10 fix: Check medium to decide 24 hour window (#1245) 2020-09-17 23:32:19 +05:30
Pranav Raj SandGitHub 8b953917e1 chore: Upgrade selfsigned to fix CVE-2020-7720 (#1242) 2020-09-17 13:23:23 +05:30
Pranav Raj SandGitHub 5ae3026125 fix: Add available_name method to agent_bot (#1238) 2020-09-16 11:46:07 +05:30
Sojan c9a56f1f02 Merge branch 'release/1.8.0' into master 2020-09-14 18:10:02 +05:30
Sojan 49b4c2ae07 chore: Bump up version 2020-09-14 18:08:53 +05:30
Pranav Raj SandGitHub 1312d07aa2 chore: Remove momentjs, use date-fns (#1233) 2020-09-14 15:14:26 +05:30
Pranav Raj SandGitHub f3a357d832 chore: Remove emojione, cleanup styles (#1232)
* chore: Remove `emojione`, cleanup styles

* Move size to variables

* Remove unused categories
2020-09-13 22:49:01 +05:30
Sojan 739c062676 chore: Enable an echo id for message create end points 2020-09-13 16:16:52 +05:30
Sojan JoseandGitHub afc062537c chore: Fix integration hooks destroy method (#1224) 2020-09-12 23:09:55 +05:30
fe3cb76a19 chore: allow DATABASE_URL env to take presedence over individual connection params. (#1147)
fixes: #1147 
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-09-11 14:32:24 +05:30
31c07771e8 feat: Notification on new messages in conversation (#1204)
fixes: #895
fixes: #1118
fixes: #1075

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-09-10 19:19:15 +05:30
Pranav Raj SandGitHub 3b92c744d6 fix: Update documentation to use launcherTitle (#1212) 2020-09-09 11:27:31 +05:30
Sojan JoseandGitHub ac5d755545 chore: Update dependencies (#1173) 2020-09-08 11:24:08 +05:30
3ffb29bf4e Chore: Squash previous migrations (#1107)
Fixes: #784
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-09-07 15:19:41 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3544514470 Chore: Bump http-proxy from 1.18.0 to 1.18.1 (#1203)
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-06 23:36:57 +05:30
Pranav Raj SandGitHub c668cccb53 chore: Upgrade yargs-parser to fix GHSA-p9pc-299p-vxgp (#1202) 2020-09-06 23:20:18 +05:30
d18c8fc08a chore: Add message_echo listener for Facebook (#1192)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2020-09-04 19:13:47 +05:30
Pranav Raj SandGitHub 715bd368f4 chore: Add alt for bubble icon (#1200) 2020-09-04 19:13:22 +05:30
afb5694ed6 chore: Enable runtime metrics on Heroku (#1178)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-09-03 15:24:08 +05:30
Pranav Raj SandGitHub e4336ffcb3 chore: Remove unused packages from package.json (#1190) 2020-09-03 14:55:05 +05:30
Pranav Raj SandGitHub 3ac32a3fbd chore: Add documentation to setup Cloudfront as the CDN (#1193)
Add documentation to setup Cloudfront as the CDN
2020-09-03 14:54:11 +05:30
9b23a11c5b chore: Improves styling for conversation header (#1167)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-09-03 14:11:07 +05:30
Pranav Raj SandGitHub dfb533db8d chore: Improve widget loading performance (#1191)
* Frontend assets url

* Remove font files from widget

* Rename variable to ASSET_CDN_HOST
2020-09-03 13:17:45 +05:30
17968e6d3f bugfix: validate_queue method - map then sort, instead of sort then map (#1187)
Co-authored-by: Sahil Mittal <sahil.mittal@snapdeal.com>
2020-09-02 20:51:40 +05:30
Sony MathewandGitHub cb6fc9fb2e fix: fonts cors issue with cdn (#1182) 2020-09-01 11:39:18 +05:30
Pranav Raj SandGitHub 29d13fbb4f chore: Add documentation for API channel (#1179) 2020-08-30 21:46:36 +05:30
Sojan JoseandGitHub 5ac093fca2 chore: Fix nil class error at bot endpoint (#1177) 2020-08-30 12:36:21 +05:30
Sojan JoseandGitHub 85ae6d92b9 feat: Enable Slack Integration in all channels (#1175) 2020-08-29 01:39:41 +05:30
Pranav Raj SandGitHub 45cd949c40 feat: Add a popout option on webwidget (#1174)
* feat: Add a popout option on webwidget
2020-08-28 17:39:46 +05:30
Sojan JoseandGitHub ce13efd273 chore: Update translations for ar, zh (#1172) 2020-08-26 21:33:52 +05:30
Sojan JoseandGitHub 2193de9853 chore: General fixes and clean up (#1169) 2020-08-25 23:04:02 +05:30
Pranav Raj SandGitHub 124e43b477 chore: Update issue template (#1168) 2020-08-23 21:12:50 +05:30
fe1259a29f feat: Update styles, Add support for Arabic text in emails (#1088)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-08-23 19:58:19 +05:30
Pranav Raj Sreepuram d605619eba Merge branch 'master' into develop 2020-08-23 18:30:14 +05:30
Pranav Raj Sreepuram e1b7165bec chore: Bump version to 1.7.2 2020-08-23 18:29:40 +05:30
Pranav Raj Sreepuram 31fd673f71 Merge branch 'hotfix/1.7.2' into develop 2020-08-23 18:11:27 +05:30
Pranav Raj Sreepuram b38952d6ca Merge branch 'hotfix/1.7.2' 2020-08-23 18:11:13 +05:30
Pranav Raj Sreepuram 37335c413a Fix window.chatwootSettings is undefined 2020-08-23 18:10:36 +05:30
Sojan 62e70ddcc8 chore: Bump versions 2020-08-23 13:55:54 +05:30
Sojan aea5ea3a06 Merge branch 'release/1.7.1' 2020-08-23 13:49:08 +05:30
8cf05f1d9f feat: Ability to edit a contact (#1092)
Ability to edit contact information in conversation sidebar

Co-authored-by: Sojan <sojan@pepalo.com>
2020-08-23 00:05:07 +05:30
Pranav Raj SandGitHub ec6cd4bbba feat: Use order_by_name as default sort order for inbox/user (#1160) 2020-08-22 22:20:22 +05:30
Pranav Raj SandGitHub 5917cd5d98 security: Upgrade webpacker to fix CVE-2020-7660 (#1161)
- security: Upgrade webpack to fix CVE-2020-7660
2020-08-22 22:18:50 +05:30
83eb92e7ff chore: Enable Russian, update translations (#1159)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-08-22 17:54:16 +05:30
cdd385b269 feat: Custom Attributes for contacts (#1158)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-08-21 19:30:27 +05:30
Sojan JoseandGitHub 507b40a51d chore: Control rendering contact inbox (#1157) 2020-08-19 23:25:55 +05:30
Pranav Raj SandGitHub e8912655a5 feat: Allow user to change the bubble title using SDK (#1155)
- Allow user to change the bubble title using SDK
- Add docs for enabling expanded bubble
2020-08-19 22:24:02 +05:30
Pranav Raj SandGitHub 662bb882f7 chore: Update API docs (#1153) 2020-08-18 12:14:37 +05:30
Francois Falala-SechetandGitHub dfe4b70d91 chore: update swagger definitions (#1151)
update swagger definitions
2020-08-17 13:07:12 +05:30
22880df429 Feature: Send chat transcript via email (#1152)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-08-17 11:25:13 +05:30
Pranav Raj SandGitHub 4b70e4e3d6 chore: Update Readme with feature details (#1149) 2020-08-15 13:13:49 +05:30
Pranav Raj SandGitHub 104f1fb1cc Update application_mailer.rb 2020-08-14 23:50:41 +05:30
Pranav Raj SandGitHub f5374e0cd9 chore: Add documentation for DATABASE_URL environment variable (#1146) 2020-08-14 17:29:35 +05:30
be91b322a4 chore: Enable additional attributes in liquid (#1144)
enable additional liquid variables in mailers

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-08-14 00:47:24 +05:30
Pranav Raj SandGitHub 0117997fb1 chore: Add docs on customizing email template content (#1141) 2020-08-13 15:06:32 +05:30
Sylvain DumontandGitHub 04bce69ded Bugfix: add missing option to s3_compatible to support minio (#1134)
minio doesn't work without force_path_style
more info here: https://kevinjalbert.com/rails-activestorage-configuration-for-minio/
2020-08-11 22:04:06 +05:30
Sojan 2063e248a9 Merge branch 'release/1.7.0' 2020-08-11 10:17:32 +05:30
Sojan JoseandGitHub 4216d63311 feat: Ability to reply to specific tweets (#1117)
Ability to choose a specific tweet to reply to

Fixes #982
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-08-11 09:57:42 +05:30
a6a62d92bf chore: Add Additional Contact APIs (#1130)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-08-10 12:15:29 +05:30
Pranav Raj SandGitHub ec3c2ed4bb chore: Use 'Lax' instead of 'None' (#1129)
fixes: #919 

Signed-off-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-08-09 18:13:17 +05:30
Pranav Raj SandGitHub 0adbc346df feat: Add an extended bubble design for the widget (#1123)
* feat: Add a new design for chat bubble

Signed-off-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>

* Add i18n

* Fix stye issues

* Set fixed font-size

* Update docs for bubble
2020-08-09 16:07:32 +05:30
Sojan JoseandGitHub a04ca24def feat: Customisable Email Templates (#1095) 2020-08-06 15:21:06 +05:30
Pranav Raj SandGitHub db877453a4 feat: Disable attachments and emoji picker in the web widget (#1102)
Signed-off-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-08-05 17:46:17 +05:30
Pranav Raj SandGitHub 3b23aa7913 Bugfix: Use server timestamp to set agent_last_seen_at (#1114) 2020-08-03 13:40:20 +05:30
Pranav Raj SandGitHub 941272cccd Bugfix: Move integration logos out of public/assets (#1115) 2020-08-03 13:22:51 +05:30
Pranav Raj SandGitHub a5262a6ff3 chore: Fix scroll in message view (#1113)
* chore: Fix scrolling in messages view

* Remove console.log

* Remove inline-style
2020-08-01 23:36:59 +05:30
Pranav Raj SandGitHub 5e5f34bedc chore: Add an indicator for incoming emails (#1112) 2020-08-01 20:56:47 +05:30
Pranav Raj SandGitHub 6d4cfcceba Chore: Update the usage of available_name instead of name (#1110)
Update the usage of available_name instead of the name
2020-08-01 18:30:47 +05:30
Pranav Raj SandGitHub 1dd3573c39 bug: Fix emails if assignee is nil (#1106) 2020-07-31 15:57:19 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4b773f2a0e Chore: Bump elliptic from 6.5.2 to 6.5.3 (#1104)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 00:08:06 +05:30
Pranav Raj SandGitHub a16d2c653d Chore: Update mailer to remove hardcoded twitter link (#1103) 2020-07-30 23:58:42 +05:30
Pranav Raj SandGitHub 2b1d445003 feat: Use display_name instead of name of the agent (#1097)
* feat: Use display_name instead of name of the agent
2020-07-27 22:19:26 +05:30
Pranav Raj Sreepuram f30c8943d9 chore: Display app version on settings/admin area 2020-07-26 21:50:59 +05:30
Pranav Raj SandGitHub 703027b834 chore: Add showBadge prop to tabs-item component (#1096) 2020-07-26 17:46:29 +05:30
89ed0b425b feat: Ability for the logged in user to create a new account (#985)
Co-authored-by: Divyesh <dkothari@box8.in>
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-07-26 12:54:50 +05:30
Bharat PatodiandGitHub 858b72a404 chore: Update documentation in sdk, channels (#1094)
Fix channels/whatsapp-sms-twilio.md
2020-07-26 12:18:54 +05:30
0f2d3418f9 fix: Add a check for 24 hour window before sending a message (#1084)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2020-07-25 22:54:45 +05:30
Pranav Raj SandGitHub 12ee7e5d82 feat: Add chatwoot:ready event listener on window (#1091)
* feat: Add `chatwoot:ready` event listener on window

* Add specs

* Rename customEventHelper.js -> CustomEventHelper.js
2020-07-25 21:54:58 +05:30
Bharat PatodiandGitHub 80b083c7fc Chore: Fix Docs for FB Twitter Website Channel (#1085) 2020-07-24 23:34:43 +05:30
Karan SharmaandGitHub bb83d6ee4d Chore: modify docker-compose for prod and local setups (#1090) 2020-07-24 23:34:09 +05:30
Pranav Raj SandGitHub c7d962b20f Chore: Remove selectedChat from store (#1087)
* Chore: Remove selected chat from store
2020-07-23 23:33:17 +05:30
e72f29a26e Chore: Update storage to support s3 compatible services (#1082)
This change is to allow using s3 compatible services such as DigitalOcean spaces, Minio, etc

Co-authored-by: petebytes <pete@apsion.com>
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-07-22 11:53:47 +05:30
d6f309ce22 Chore: Initialize Cypress tests (#1078)
Addresses: #412

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-07-21 20:11:22 +05:30
Sony MathewandGitHub fcb7625616 Bug: Fixed quoted text parsing in incoming email (#1076)
* Bugfix: Fixed quoted text parsing in incoming email

We had changed the support email from an account based
only value to account based with fallback on global config
and environment variable.

Incoming email quoted text parsing was still based on
account based support email. Changed this to utilize
the newly introduced fallback values from global config
and environment for parsing quoted text.

* Bugfix: Added one more sender agnostic regex for quoted text parsing
2020-07-21 12:20:46 +05:30
Sojan JoseandGitHub 8079bf50a0 Feature: API Channel (#1052) 2020-07-21 12:15:24 +05:30
Sojan JoseandGitHub fa04098c20 Chore: Run ConfigLoader on migrate (#1072)
We have been duplicating the config loader migration. Hence let's hook it to rake db:migrate.
2020-07-20 19:38:25 +05:30
Sojan JoseandGitHub d800b55ac6 Chore: Add display name to the user (#1067)
* Chore: Adding browser info to web widget triggered event

fixes: #970

* Chore: Rename nickname to display name

references: #972

* Chore: Change nickname in code

* chore: fix errors

* Chore: update nginx config

fixes: #1057

* Chore: Fix specs
2020-07-20 18:28:14 +05:30
Bharat PatodiandGitHub 29838f9424 Fix grammatical issues in Ubuntu Environment Setup (#1070) 2020-07-20 17:43:38 +05:30
Pranav Raj SandGitHub 440f449e24 Enhancement: Remove v-model.trim from reply box (#1071) 2020-07-20 17:39:36 +05:30
Sony MathewandGitHub b803ae3300 Bugfix: Private notes in emails & broken Signup (#1068)
* 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
2020-07-20 12:47:02 +05:30
Sony MathewandGitHub 96efc44b82 Chore: Feature lock email settings in UI (#1065)
* 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.
2020-07-19 23:08:07 +05:30
Sojan JoseandGitHub 7607e8edb4 Chore: Enable bot conversations in status dropdown (#1041) 2020-07-19 21:22:12 +05:30
Sony MathewandGitHub 7ca192615d Chore: Move some email configs to ENV variables (#1064)
For the outgoing emails which has dependency on the incoming
part as well like the conversation continuity part, some of the
config variables used were entirely based on the account attributes.

But this is not true in case of self hosted situations where you have
multiple accounts and have a common config for incoming emails.

So moved out some of the attributes entirely dependednt on the account
to ENV with a fallback to the Global config.

Also, with this changes the name of the agent will be shown in the
email clinet with in the conversation rather than just the support
email address. This has a huge UX impact on the cutomer.

Modified all the necessary unit tests to reflect these changes.

Updated the .env.example file for the new ENV variable.
2020-07-19 15:35:55 +05:30
Sony MathewandGitHub 7ef45e5844 Chore: Change the prefix in reply emails (#1060)
* Chore: Change the prefix in reply emails

In conversation continuity the reply to email was looking like

reply+to+{some_random_hex_id}@reply.chatwoot.com

Changed the prefix to just `reply` instead of `reply+to`.

* Chore: Change reply email prefix in outbound emails

Changed the prefix from `reply+to+` to just `reply+` in
the reply emails in the converstaion related outbound emails.
2020-07-19 13:34:34 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
642efe8d40 Chore: Bump lodash from 4.17.15 to 4.17.19 (#1056)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-18 12:05:04 +05:30
Bharat PatodiandGitHub 9e50d22472 Chore: Corrections in docs (#1054) 2020-07-17 20:38:21 +05:30
a18d54b706 Chore: Cleanup attachment handling for Facebook & Whatsapp (#1051)
* Chore: Enable file upload for facebook messenger
* Chore: Fix attachments
* Chore: Fix Specs
* Fix ReplyBox file attachment logic
* Set default value for message

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-07-17 00:32:32 +05:30
Pranav Raj SandGitHub 196741d975 Bug: Fix translated keys for availability statuses in Greek (#1050) 2020-07-15 22:55:57 +05:30
Sony MathewandGitHub d5a6f5e352 Enhancement: ability to send out an email without summary #1048 (#1049)
Right now as part of conversation continuity, we are using the
ConversationReplyMailer which sends a summary of messages including
the incoming messages when an agent replies. Ideally, we want
to send only the reply of that agent and not a summary when
Conversation continuity is enabled. Added the functionality
to send the reply email without summary. Added required unit
tests to cover the changes.

ref: #1048
2020-07-15 16:33:52 +05:30
Bharat PatodiandGitHub a8ce9ae59c Chore: grammatical changes to readme (#1035) 2020-07-14 22:52:48 +05:30
Sojan 196ffe3ea2 Merge branch 'hotfix/1.6.3' into develop 2020-07-14 21:59:52 +05:30
Sojan 80dcc8339e Merge branch 'hotfix/1.6.3' 2020-07-14 21:59:16 +05:30
TianluandSojan ba5539d9bf Chore: dup module name RoundRobin (#1036)
Fix the duplicate module name in migration
2020-07-14 21:56:49 +05:30
TianluandGitHub a260495f3d Chore: dup module name RoundRobin (#1036)
Fix the duplicate module name in migration
2020-07-14 20:16:03 +05:30
Sojan aac3c27483 Merge branch 'hotfix/1.6.2' into develop
# Conflicts:
#	app.json
2020-07-14 11:38:09 +05:30
Pranav Raj SandGitHub 5dcc8a9e81 Chore: Add docs on supported features per channel (#1032)
* Chore: Add docs on supported features per channel
2020-07-12 20:35:47 +05:30
Dmitry ShurcoandGitHub 6f47c07362 Update Heroku deploy (#1030) 2020-07-12 17:10:29 +05:30
24101eb117 Feature: Add persian translation (#1017)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-07-10 21:08:59 +05:30
e8994165ea Chore: Add migration for feature flags (#1024)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-07-10 00:09:40 +05:30
Pranav Raj SandGitHub 929575f11a Chore: Update copy on Signup page (#1023) 2020-07-09 16:28:09 +05:30
Sojan 3593a84f26 Merge branch 'hotfix/1.6.1' into develop 2020-07-08 13:38:54 +05:30
Pranav Raj SandGitHub abc335cc8e Feature: Add support for labels in form (#1019) 2020-07-08 13:13:48 +05:30
3940 changed files with 295436 additions and 29508 deletions
+3
View File
@@ -0,0 +1,3 @@
---
ignore:
- CVE-2021-41098 # https://github.com/chatwoot/chatwoot/issues/3097 (update once azure blob storage is updated)
+24 -9
View File
@@ -7,13 +7,13 @@ defaults: &defaults
working_directory: ~/build
docker:
# specify the version you desire here
- image: circleci/ruby:2.7.1-node-browsers
- image: cimg/ruby:3.0.4-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/postgres:alpine
- image: circleci/redis:alpine
- image: cimg/postgres:14.1
- image: cimg/redis:6.2.6
environment:
- CC_TEST_REPORTER_ID: b1b5c4447bf93f6f0b06a64756e35afd0810ea83649f03971cbf303b4449456f
- RAILS_LOG_TO_STDOUT: false
@@ -40,20 +40,19 @@ jobs:
- restore_cache:
keys:
- chatwoot-bundle-{{ checksum "Gemfile.lock" }}
- chatwoot-bundle
- chatwoot-bundle-{{ .Environment.CACHE_VERSION }}-v20220524-{{ checksum "Gemfile.lock" }}
- run: bundle install --frozen --path ~/.bundle
- save_cache:
paths:
- ~/.bundle
key: chatwoot-bundle-{{ checksum "Gemfile.lock" }}
key: chatwoot-bundle-{{ .Environment.CACHE_VERSION }}-v20220524-{{ checksum "Gemfile.lock" }}
# Only necessary if app uses webpacker or yarn in some other way
- restore_cache:
keys:
- chatwoot-yarn-{{ checksum "yarn.lock" }}
- chatwoot-yarn-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }}
- chatwoot-yarn-
- run:
@@ -62,7 +61,7 @@ jobs:
# Store yarn / webpacker cache
- save_cache:
key: chatwoot-yarn-{{ checksum "yarn.lock" }}
key: chatwoot-yarn-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
@@ -77,6 +76,18 @@ jobs:
paths:
- cc-test-reporter
# verify swagger specification
- run:
name: Verify swagger API specification
command: |
bundle exec rake swagger:build
if [[ `git status swagger/swagger.json --porcelain` ]]
then
echo "ERROR: The swagger.json file is not in sync with the yaml specification. Run 'rake swagger:build' and commit 'swagger/swagger.json'."
exit 1
fi
curl -L https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.0/openapi-generator-cli-5.3.0.jar > ~/tmp/openapi-generator-cli-5.3.0.jar
java -jar ~/tmp/openapi-generator-cli-5.3.0.jar validate -i swagger/swagger.json
# Database setup
- run: yarn install --check-files
- run: bundle exec rake db:create
@@ -89,6 +100,10 @@ jobs:
- run:
name: Rubocop
command: bundle exec rubocop
# - run:
# name: Brakeman
# command: bundle exec brakeman
- run:
name: eslint
@@ -98,7 +113,7 @@ jobs:
- run:
name: Run backend tests
command: |
bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) --profile=10
bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) --profile=10 --format documentation
~/tmp/cc-test-reporter format-coverage -t simplecov -o ~/tmp/codeclimate.backend.json coverage/backend/.resultset.json
- persist_to_workspace:
root: ~/tmp
+40 -16
View File
@@ -1,4 +1,4 @@
version: "2"
version: '2'
plugins:
rubocop:
enabled: false
@@ -14,19 +14,43 @@ plugins:
checks:
similar-code:
enabled: false
method-count:
enabled: true
config:
threshold: 32
file-lines:
enabled: true
config:
threshold: 300
method-lines:
config:
threshold: 50
exclude_patterns:
- "spec/"
- "**/specs/"
- "db/*"
- "bin/**/*"
- "db/**/*"
- "config/**/*"
- "public/**/*"
- "vendor/**/*"
- "node_modules/**/*"
- "lib/tasks/auto_annotate_models.rake"
- "app/test-matchers.js"
- "docs/*"
- "**/*.md"
- "**/*.yml"
- "app/javascript/dashboard/i18n/locale"
- 'spec/'
- '**/specs/'
- 'db/*'
- 'bin/**/*'
- 'db/**/*'
- 'config/**/*'
- 'public/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'lib/tasks/auto_annotate_models.rake'
- 'app/test-matchers.js'
- 'docs/*'
- '**/*.md'
- '**/*.yml'
- 'app/javascript/dashboard/i18n/locale'
- '**/*.stories.js'
- 'stories/'
- 'app/javascript/dashboard/components/widgets/conversation/advancedFilterItems/index.js'
- 'app/javascript/shared/constants/countries.js'
- 'app/javascript/dashboard/components/widgets/conversation/advancedFilterItems/languages.js'
- 'app/javascript/dashboard/routes/dashboard/contacts/contactFilterItems/index.js'
- 'app/javascript/dashboard/routes/dashboard/settings/automation/constants.js'
- 'app/javascript/dashboard/components/widgets/FilterInput/FilterOperatorTypes.js'
- 'app/javascript/dashboard/routes/dashboard/settings/reports/constants.js'
- 'app/javascript/dashboard/i18n/index.js'
- 'app/javascript/widget/i18n/index.js'
- 'app/javascript/survey/i18n/index.js'
- 'app/javascript/shared/constants/locales.js'
+8
View File
@@ -0,0 +1,8 @@
# The below image is created out of the Dockerfile.base
# It has the dependencies already installed so that codespace will boot up fast
FROM ghcr.io/chatwoot/chatwoot_codespace:latest
# Do the set up required for chatwoot app
WORKDIR /workspace
COPY . /workspace
RUN yarn && gem install bundler && bundle install
+72
View File
@@ -0,0 +1,72 @@
ARG VARIANT=ubuntu-20.04
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}
# Update args in docker-compose.yaml to set the UID/GID of the "vscode" user.
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
groupmod --gid $USER_GID vscode \
&& usermod --uid $USER_UID --gid $USER_GID vscode \
&& chmod -R $USER_UID:$USER_GID /home/vscode; \
fi
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
build-essential \
libssl-dev \
zlib1g-dev \
gnupg2 \
tar \
tzdata \
postgresql-client \
libpq-dev \
yarn \
git \
imagemagick \
tmux \
zsh \
git-flow \
npm
# Install rbenv and ruby
ARG RUBY_VERSION="3.0.4"
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
&& echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
&& echo 'eval "$(rbenv init -)"' >> ~/.bashrc
ENV PATH "/root/.rbenv/bin/:/root/.rbenv/shims/:$PATH"
RUN git clone https://github.com/rbenv/ruby-build.git && \
PREFIX=/usr/local ./ruby-build/install.sh
RUN rbenv install $RUBY_VERSION && \
rbenv global $RUBY_VERSION && \
rbenv versions
# Install overmind
RUN curl -L https://github.com/DarthSim/overmind/releases/download/v2.1.0/overmind-v2.1.0-linux-amd64.gz > overmind.gz \
&& gunzip overmind.gz \
&& sudo mv overmind /usr/local/bin \
&& chmod +x /usr/local/bin/overmind
# Install gh
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh
# Do the set up required for chatwoot app
WORKDIR /workspace
COPY . /workspace
# set up ruby
COPY Gemfile Gemfile.lock ./
RUN gem install bundler && bundle install
# set up node js
RUN npm install npm@latest -g && \
npm install n -g && \
n latest
RUN npm install --global yarn
RUN yarn
+40
View File
@@ -0,0 +1,40 @@
{
"name": "Chatwoot Development Codespace",
"service": "app",
"dockerComposeFile": "docker-compose.yml",
"settings": {
"terminal.integrated.shell.linux": "/bin/zsh"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"rebornix.Ruby",
"misogi.ruby-rubocop",
"wingrunr21.vscode-ruby",
"davidpallinder.rails-test-runner",
"eamodio.gitlens",
"github.copilot",
"mrmlnc.vscode-duplicate"
],
// 5432 postgres
// 6379 redis
// 1025,8025 mailhog
"forwardPorts": [8025, 3000, 3035],
"postCreateCommand": ".devcontainer/scripts/setup.sh && bundle exec rake db:chatwoot_prepare && yarn",
"portsAttributes": {
"3000": {
"label": "Rails Server"
},
"3035": {
"label": "Webpack Dev Server"
},
"8025": {
"label": "Mailhog UI"
}
}
}
+56
View File
@@ -0,0 +1,56 @@
# https://github.com/microsoft/vscode-dev-containers/blob/master/containers/python-3-postgres/.devcontainer/docker-compose.yml
# https://github.com/microsoft/vscode-dev-containers/blob/master/containers/ruby-rails/.devcontainer/devcontainer.json
#
version: '3'
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
args:
# Update 'VARIANT' to pick a Ruby version: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/ruby
VARIANT: 3
# [Choice] Install Node.js
INSTALL_NODE: "true"
NODE_VERSION: "lts/*"
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: 1000
USER_GID: 1000
volumes:
- ..:/workspace:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
db:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
redis:
image: redis:latest
restart: unless-stopped
network_mode: service:db
volumes:
- redis-data:/data
mailhog:
restart: unless-stopped
image: mailhog/mailhog
network_mode: service:db
volumes:
postgres-data:
redis-data:
+13
View File
@@ -0,0 +1,13 @@
cp .env.example .env
sed -i -e '/REDIS_URL/ s/=.*/=redis:\/\/localhost:6379/' .env
sed -i -e '/POSTGRES_HOST/ s/=.*/=localhost/' .env
sed -i -e '/SMTP_ADDRESS/ s/=.*/=localhost/' .env
sed -i -e "/FRONTEND_URL/ s/=.*/=https:\/\/$CODESPACE_NAME-3000.githubpreview.dev/" .env
sed -i -e "/WEBPACKER_DEV_SERVER_PUBLIC/ s/=.*/=https:\/\/$CODESPACE_NAME-3035.githubpreview.dev/" .env
# uncomment the webpacker env variable
sed -i -e '/WEBPACKER_DEV_SERVER_PUBLIC/s/^# //' .env
# fix the error with webpacker
echo 'export NODE_OPTIONS=--openssl-legacy-provider' >> ~/.zshrc
# codespaces make the ports public
gh codespace ports visibility 3000:public 3035:public 8025:public -c $CODESPACE_NAME
+112 -18
View File
@@ -4,6 +4,13 @@ SECRET_KEY_BASE=replace_with_lengthy_secure_hex
# Replace with the URL you are planning to use for your app
FRONTEND_URL=http://0.0.0.0:3000
# If the variable is set, all non-authenticated pages would fallback to the default locale.
# Whenever a new account is created, the default language will be DEFAULT_LOCALE instead of en
# DEFAULT_LOCALE=en
# If you plan to use CDN for your assets, set Asset CDN Host
ASSET_CDN_HOST=
# Force all access to the app over SSL, default is set to false
FORCE_SSL=false
@@ -11,7 +18,7 @@ FORCE_SSL=false
# true : default option, allows sign ups
# false : disables all the end points related to sign ups
# api_only: disables the UI for signup, but you can create sign ups via the account apis
ENABLE_ACCOUNT_SIGNUP=true
ENABLE_ACCOUNT_SIGNUP=false
# Redis config
REDIS_URL=redis://redis:6379
@@ -19,35 +26,58 @@ REDIS_URL=redis://redis:6379
# which will be the password for the redis service running inside the docker-compose
# to make it secure
REDIS_PASSWORD=
# Redis Sentinel can be used by passing list of sentinel host and ports e,g. sentinel_host1:port1,sentinel_host2:port2
REDIS_SENTINELS=
# Redis sentinel master name is required when using sentinel, default value is "mymaster".
# You can find list of master using "SENTINEL masters" command
REDIS_SENTINEL_MASTER_NAME=
# Redis premium breakage in heroku fix
# enable the following configuration
# ref: https://github.com/chatwoot/chatwoot/issues/2420
# REDIS_OPENSSL_VERIFY_MODE=none
# Postgres Database config variables
# You can leave POSTGRES_DATABASE blank. The default name of
# the database in the production environment is chatwoot_production
POSTGRES_DATABASE=
POSTGRES_HOST=postgres
POSTGRES_USERNAME=postgres
POSTGRES_PASSWORD=
RAILS_ENV=development
RAILS_MAX_THREADS=5
# Mail outgoing
MAILER_SENDER_EMAIL=accounts@chatwoot.com
SMTP_PORT=1025
# The email from which all outgoing emails are sent
# could user either `email@yourdomain.com` or `BrandName <email@yourdomain.com>`
MAILER_SENDER_EMAIL="Chatwoot <accounts@chatwoot.com>"
#SMTP domain key is set up for HELO checking
SMTP_DOMAIN=chatwoot.com
# if you are running docker-compose, set SMTP_ADDRESS value as "mailhog",
# else set the value as "localhost"
# the default value is set "mailhog" and is used by docker-compose for development environments,
# Set the value as "localhost" or your SMTP address in other environments
SMTP_ADDRESS=mailhog
SMTP_PORT=1025
SMTP_USERNAME=
SMTP_PASSWORD=
# plain,login,cram_md5
SMTP_AUTHENTICATION=
SMTP_ENABLE_STARTTLS_AUTO=
SMTP_ENABLE_STARTTLS_AUTO=true
# Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html
SMTP_OPENSSL_VERIFY_MODE=peer
# Comment out the following environment variables if required by your SMTP server
# SMTP_TLS=
# SMTP_SSL=
# Mail Incoming
# This is the domain set for the reply emails when conversation continuity is enabled
MAILER_INBOUND_EMAIL_DOMAIN=
# Set this to appropriate ingress channel with regards to incoming emails
# Possible values are :
# :relay for Exim, Postfix, Qmail
# :mailgun for Mailgun
# :mandrill for Mandrill
# :postmark for Postmark
# :sendgrid for Sendgrid
# relay for Exim, Postfix, Qmail
# mailgun for Mailgun
# mandrill for Mandrill
# postmark for Postmark
# sendgrid for Sendgrid
RAILS_INBOUND_EMAIL_SERVICE=
# Use one of the following based on the email ingress service
# Ref: https://edgeguides.rubyonrails.org/action_mailbox_basics.html
@@ -65,9 +95,6 @@ AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
# Sentry
SENTRY_DSN=
# Log settings
# Disable if you want to write logs to a file
RAILS_LOG_TO_STDOUT=true
@@ -82,6 +109,9 @@ FB_VERIFY_TOKEN=
FB_APP_SECRET=
FB_APP_ID=
# https://developers.facebook.com/docs/messenger-platform/instagram/get-started#app-dashboard
IG_VERIFY_TOKEN=
# Twitter
# documentation: https://www.chatwoot.com/docs/twitter-app-setup
TWITTER_APP_ID=
@@ -95,19 +125,83 @@ SLACK_CLIENT_SECRET=
### Change this env variable only if you are using a custom build mobile app
## Mobile app env variables
IOS_APP_ID=6C953F3RX2.com.chatwoot.app
IOS_APP_ID=L7YLMN4634.com.chatwoot.app
ANDROID_BUNDLE_ID=com.chatwoot.app
# https://developers.google.com/android/guides/client-auth (use keytool to print the fingerprint in the first section)
ANDROID_SHA256_CERT_FINGERPRINT=AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38:D4:5D:D4:53:F8:3B:FB:D3:C6:28:64:1D:AA:08:1E:D8
### Smart App Banner
# https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
# You can find your app-id in https://itunesconnect.apple.com
#IOS_APP_IDENTIFIER=1495796682
## Push Notification
## generate a new key value here : https://d3v.one/vapid-key-generator/
# VAPID_PUBLIC_KEY=
# VAPID_PRIVATE_KEY=
#
# for mobile apps
# for mobile apps
# FCM_SERVER_KEY=
## Bot Customizations
USE_INBOX_AVATAR_FOR_BOT=true
### APM and Error Monitoring configurations
## Elastic APM
## https://www.elastic.co/guide/en/apm/agent/ruby/current/getting-started-rails.html
# ELASTIC_APM_SERVER_URL=
# ELASTIC_APM_SECRET_TOKEN=
## Sentry
# SENTRY_DSN=
## Scout
## https://scoutapm.com/docs/ruby/configuration
# SCOUT_KEY=YOURKEY
# SCOUT_NAME=YOURAPPNAME (Production)
# SCOUT_MONITOR=true
## NewRelic
# https://docs.newrelic.com/docs/agents/ruby-agent/configuration/ruby-agent-configuration/
# NEW_RELIC_LICENSE_KEY=
# Set this to true to allow newrelic apm to send logs.
# This is turned off by default.
# NEW_RELIC_APPLICATION_LOGGING_ENABLED=
## Datadog
## https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#environment-variables
# DD_TRACE_AGENT_URL=
## IP look up configuration
## ref https://github.com/alexreisner/geocoder/blob/master/README_API_GUIDE.md
## works only on accounts with ip look up feature enabled
# IP_LOOKUP_SERVICE=geoip2
# maxmindb api key to use geoip2 service
# IP_LOOKUP_API_KEY=
## Rack Attack configuration
## To prevent and throttle abusive requests
# ENABLE_RACK_ATTACK=true
## Running chatwoot as an API only server
## setting this value to true will disable the frontend dashboard endpoints
# CW_API_ONLY_SERVER=false
## Development Only Config
# if you want to use letter_opener for local emails
# LETTER_OPENER=true
# meant to be used in github codespaces
# WEBPACKER_DEV_SERVER_PUBLIC=
# If you want to use official mobile app,
# the notifications would be relayed via a Chatwoot server
ENABLE_PUSH_RELAY_SERVER=true
# Stripe API key
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
# Set to true if you want to upload files to cloud storage using the signed url
# Make sure to follow https://edgeguides.rubyonrails.org/active_storage_overview.html#cross-origin-resource-sharing-cors-configuration on the cloud storage after setting this to true.
DIRECT_UPLOADS_ENABLED=
+33 -14
View File
@@ -1,5 +1,10 @@
module.exports = {
extends: ['airbnb-base/legacy', 'prettier', 'plugin:vue/recommended'],
extends: [
'airbnb-base/legacy',
'prettier',
'plugin:vue/recommended',
'plugin:storybook/recommended',
],
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2020,
@@ -19,17 +24,32 @@ module.exports = {
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'import/no-unresolved': 'off',
'vue/max-attributes-per-line': ['error', {
'singleline': 20,
'multiline': {
'max': 1,
'allowFirstLine': false
'vue/max-attributes-per-line': [
'error',
{
singleline: 20,
multiline: {
max: 1,
allowFirstLine: false,
},
},
}],
'vue/html-self-closing': 'off',
"vue/no-v-html": 'off',
'import/extensions': ['off']
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'vue/no-v-html': 'off',
'vue/singleline-html-element-content-newline': 'off',
'import/extensions': ['off'],
'no-console': 'error',
},
settings: {
'import/resolver': {
@@ -40,11 +60,10 @@ module.exports = {
},
env: {
browser: true,
node: true,
jest: true,
jasmine: true
node: true,
},
globals: {
__WEBPACK_ENV__: true,
bus: true,
},
};
+18 -2
View File
@@ -2,15 +2,16 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: 'Bug'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
@@ -18,11 +19,25 @@ Steps to reproduce the behavior:
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Browser logs**
Share the browser logs to debug the issue further
**Server logs**
Share the server logs to debug the issue further
**Environment**
Describe whether you are using Chatwoot Cloud (app.chatwoot.com) or a self hosted installation of Chatwoot. If you are using a self hosted installation of Chatwoot describe the type of deployment (Docker/Linux VM installation/Heroku)
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
@@ -35,4 +50,5 @@ If applicable, add screenshots to help explain your problem.
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
+2 -2
View File
@@ -24,9 +24,9 @@ Please describe the tests that you ran to verify your changes. Provide instructi
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] Any dependent changes have been merged and published in downstream modules
+36
View File
@@ -0,0 +1,36 @@
# We often have cases where users would comment over stale closed Github Issues.
# This creates unnecessary noise for the original reporter and makes it harder for triaging.
# This action locks the closed threads once it is inactive for over a month.
name: 'Lock Threads'
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: lock
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
with:
issue-inactive-days: '30'
issue-lock-reason: 'resolved'
issue-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
pr-inactive-days: '30'
pr-lock-reason: 'resolved'
pr-comment: >
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
+58
View File
@@ -0,0 +1,58 @@
# #
# #
# # Linux nightly installer action
# # This action will try to install and setup
# # chatwoot on an Ubuntu 20.04 machine using
# # the linux installer script.
# #
# # This is set to run daily at midnight.
# #
name: Run Linux nightly installer
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
nightly:
runs-on: ubuntu-20.04
steps:
- name: get installer
run: |
wget https://get.chatwoot.app/linux/install.sh
chmod +x install.sh
- name: create input file
run: |
echo "no" > input
echo "yes" >> input
- name: Run the installer
run: |
sudo ./install.sh --install < input
# temp fix for postgresql not starting
# automatically in gh action env
- name: start postgresql service
if: always()
run: |
sudo service postgresql start
#re-running the installer again
- name: Run the installer again
if: always()
run: |
sudo ./install.sh --install < input
# disabling http verify for now as http
# access to port 3000 fails in gh action env
# - name: Verify
# if: always()
# run: |
# sudo netstat -ntlp | grep 3000
# sudo systemctl restart chatwoot.target
# curl http://localhost:3000/api
@@ -0,0 +1,23 @@
name: Publish Codespace Base Image
on:
workflow_dispatch:
jobs:
publish-code-space-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Codespace Base Image
run: |
docker build . -t ghcr.io/chatwoot/chatwoot_codespace:latest -f .devcontainer/Dockerfile.base
docker push ghcr.io/chatwoot/chatwoot_codespace:latest
+62
View File
@@ -0,0 +1,62 @@
# #
# # This action will publish Chatwoot CE docker image.
# # This is set to run against merges to develop, master
# # and when tags are created.
# #
name: Publish Chatwoot CE docker images
on:
push:
branches:
- develop
- master
tags:
- v*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
GIT_REF: ${{ github.head_ref || github.ref_name }} # ref_name to get tags/branches
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Strip enterprise code
run: |
rm -rf enterprise
rm -rf spec/enterprise
- name: Set Chatwoot edition
run: |
echo -en '\nENV CW_EDITION="ce"' >> docker/Dockerfile
- name: set docker tag
run: |
echo "DOCKER_TAG=chatwoot/chatwoot:$GIT_REF-ce" >> $GITHUB_ENV
- name: replace docker tag if master
if: github.ref_name == 'master'
run: |
echo "DOCKER_TAG=chatwoot/chatwoot:latest-ce" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ env.DOCKER_TAG }}
+73
View File
@@ -0,0 +1,73 @@
# #
# # This action will strip the enterprise folder
# # and run the spec.
# # This is set to run against every PR.
# #
name: Run Chatwoot CE spec
on:
push:
branches:
- develop
- master
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:10.8
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
# tmpfs makes DB faster by using RAM
options: >-
--mount type=tmpfs,destination=/var/lib/postgresql/data
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.4 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: yarn
run: yarn install
- name: Strip enterprise code
run: |
rm -rf enterprise
rm -rf spec/enterprise
- name: Create database
run: bundle exec rake db:create
- name: Seed database
run: bundle exec rake db:schema:load
- name: yarn check-files
run: yarn install --check-files
# Run rails tests
- name: Run backend tests
run: |
bundle exec rspec --profile=10 --format documentation
+9 -1
View File
@@ -16,6 +16,7 @@
/tmp/*
!/log/.keep
!/tmp/.keep
*.mmdb
# Ignore Byebug command history file.
.byebug_history
@@ -23,7 +24,7 @@
*.log
# Ignore application configuration
node_modules
master.key
*.rdb
# Ignore env files
@@ -55,3 +56,10 @@ node_modules
package-lock.json
*.dump
# cypress
test/cypress/videos/*
/config/master.key
/config/*.enc
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run eslint
bundle exec rubocop -a
git add
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
sh bin/validate_push
+1 -1
View File
@@ -1 +1 @@
12.16.1
14.17.4
+2 -1
View File
@@ -1,5 +1,6 @@
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "es5",
"arrowParens": "avoid"
}
+84 -29
View File
@@ -4,25 +4,20 @@ require:
- rubocop-rspec
inherit_from: .rubocop_todo.yml
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Layout/LineLength:
Max: 150
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Metrics/ClassLength:
Max: 125
Exclude:
- 'app/models/conversation.rb'
- 'app/models/contact.rb'
- 'app/mailers/conversation_reply_mailer.rb'
- 'app/models/message.rb'
- 'app/builders/messages/facebook/message_builder.rb'
- 'app/controllers/api/v1/accounts/contacts_controller.rb'
- 'app/listeners/action_cable_listener.rb'
- 'app/models/conversation.rb'
RSpec/ExampleLength:
Max: 25
Style/Documentation:
@@ -33,49 +28,79 @@ Style/FrozenStringLiteralComment:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/RedundantFetchBlock:
Enabled: true
Style/RedundantRegexpCharacterClass:
Enabled: true
Style/RedundantRegexpEscape:
Enabled: true
Style/SlicingWithRange:
Enabled: true
Style/OpenStructUse:
Enabled: false
Style/OptionalBooleanParameter:
Exclude:
- 'app/services/email_templates/db_resolver_service.rb'
- 'app/dispatchers/dispatcher.rb'
Style/GlobalVars:
Exclude:
- 'config/initializers/redis.rb'
- 'config/initializers/01_redis.rb'
- 'config/initializers/rack_attack.rb'
- 'lib/redis/alfred.rb'
- 'lib/global_config.rb'
Style/ClassVars:
Exclude:
- 'app/services/email_templates/db_resolver_service.rb'
Lint/MissingSuper:
Exclude:
- 'app/drops/base_drop.rb'
Lint/SymbolConversion:
Enabled: false
Lint/EmptyBlock:
Exclude:
- 'app/views/api/v1/accounts/conversations/toggle_status.json.jbuilder'
Lint/OrAssignmentToConstant:
Exclude:
- 'lib/redis/config.rb'
Metrics/BlockLength:
Exclude:
- spec/**/*
- '**/routes.rb'
- 'config/environments/*'
- db/schema.rb
Metrics/ModuleLength:
Exclude:
- lib/seeders/message_seeder.rb
Rails/ApplicationController:
Exclude:
- 'app/controllers/api/v1/widget/messages_controller.rb'
- 'app/controllers/dashboard_controller.rb'
- 'app/controllers/widget_tests_controller.rb'
- 'app/controllers/widgets_controller.rb'
- 'app/controllers/platform_controller.rb'
- 'app/controllers/public_controller.rb'
- 'app/controllers/survey/responses_controller.rb'
Rails/CompactBlank:
Enabled: false
Rails/EnvironmentVariableAccess:
Enabled: false
Rails/TimeZoneAssignment:
Enabled: false
Rails/RedundantPresenceValidationOnBelongsTo:
Enabled: false
Style/ClassAndModuleChildren:
EnforcedStyle: compact
Exclude:
- 'config/application.rb'
Style/MapToHash:
Enabled: false
RSpec/NestedGroups:
Enabled: true
Max: 4
RSpec/MessageSpies:
Enabled: false
RSpec/StubbedMock:
Enabled: false
RSpec/FactoryBot/SyntaxMethods:
Enabled: false
Naming/VariableNumber:
Enabled: false
Metrics/MethodLength:
Exclude:
- 'db/migrate/20161123131628_devise_token_auth_create_users.rb'
- 'db/migrate/20211219031453_update_foreign_keys_on_delete.rb'
Rails/CreateTableWithTimestamps:
Exclude:
- 'db/migrate/20170207092002_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb'
@@ -86,9 +111,14 @@ Style/GuardClause:
- 'app/models/message.rb'
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
Metrics/AbcSize:
Exclude:
Exclude:
- 'app/controllers/concerns/auth_helper.rb'
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
- 'db/migrate/20161123131628_devise_token_auth_create_users.rb'
- 'app/controllers/api/v1/accounts/inboxes_controller.rb'
- 'db/migrate/20211219031453_update_foreign_keys_on_delete.rb'
Metrics/CyclomaticComplexity:
Max: 7
Exclude:
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
Rails/ReversibleMigration:
@@ -101,6 +131,7 @@ Rails/ReversibleMigration:
- 'db/migrate/20191020085608_rename_old_tables.rb'
- 'db/migrate/20191126185833_update_user_invite_foreign_key.rb'
- 'db/migrate/20191130164019_add_template_type_to_messages.rb'
- 'db/migrate/20210513083044_remove_not_null_from_webhook_url_channel_api.rb'
Rails/BulkChangeTable:
Exclude:
- 'db/migrate/20161025070152_removechannelsfrommodels.rb'
@@ -111,13 +142,27 @@ Rails/BulkChangeTable:
- 'db/migrate/20170511134418_latlong.rb'
- 'db/migrate/20191027054756_create_contact_inboxes.rb'
- 'db/migrate/20191130164019_add_template_type_to_messages.rb'
Rails/UniqueValidationWithoutIndex:
- 'db/migrate/20210425093724_convert_integration_hook_settings_field.rb'
Rails/UniqueValidationWithoutIndex:
Exclude:
- 'app/models/channel/twitter_profile.rb'
- 'app/models/webhook.rb'
- 'app/models/contact.rb'
- 'app/models/integrations/hook.rb'
Rails/RenderInline:
Exclude:
- 'app/controllers/swagger_controller.rb'
Performance/CollectionLiteralInLoop:
Exclude:
- 'db/migrate/20210315101919_enable_email_channel.rb'
RSpec/NamedSubject:
Enabled: false
# we should bring this down
RSpec/MultipleMemoizedHelpers:
Max: 12
AllCops:
NewCops: enable
Exclude:
- 'bin/**/*'
- 'db/schema.rb'
@@ -129,3 +174,13 @@ AllCops:
- 'config/environments/**/*'
- 'tmp/**/*'
- 'storage/**/*'
- 'db/migrate/20200225162150_init_schema.rb'
- 'db/migrate/20210611180222_create_active_storage_variant_records.active_storage.rb'
- 'db/migrate/20210611180221_add_service_name_to_active_storage_blobs.active_storage.rb'
- db/migrate/20200309213132_add_account_id_to_agent_bot_inboxes.rb
- db/migrate/20200331095710_add_identifier_to_contact.rb
- db/migrate/20200429082655_add_medium_to_twilio_sms.rb
- db/migrate/20200503151130_add_account_feature_flag.rb
- db/migrate/20200927135222_add_last_activity_at_to_conversation.rb
- db/migrate/20210306170117_add_last_activity_at_to_contacts.rb
- db/migrate/20220809104508_revert_cascading_indexes.rb
-7
View File
@@ -6,13 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 1
# Configuration parameters: EnforcedStyle.
# SupportedStyles: native, lf, crlf
Layout/EndOfLine:
Exclude:
- 'deploy/after_restart.rb'
# Offense count: 1
Lint/DuplicateMethods:
Exclude:
+1 -1
View File
@@ -1 +1 @@
2.7.1
3.0.4
+1
View File
@@ -282,3 +282,4 @@ exclude:
- 'app/javascript/widget/assets/scss/_reset.scss'
- 'app/javascript/widget/assets/scss/sdk.css'
- 'app/assets/stylesheets/administrate/reset/_normalize.scss'
- 'app/javascript/shared/assets/stylesheets/*.scss'
+44
View File
@@ -0,0 +1,44 @@
const path = require('path');
const resolve = require('../config/webpack/resolve');
// Chatwoot's webpack.config.js
process.env.NODE_ENV = 'development';
const custom = require('../config/webpack/environment');
module.exports = {
stories: [
'../stories/**/*.stories.mdx',
'../app/javascript/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
{
name: '@storybook/addon-docs',
options: {
vueDocgenOptions: {
alias: {
'@': path.resolve(__dirname, '../'),
},
},
},
},
'@storybook/addon-links',
'@storybook/addon-essentials',
],
webpackFinal: config => {
const newConfig = {
...config,
resolve: {
...config.resolve,
modules: custom.resolvedModules.map(i => i.value),
},
};
newConfig.module.rules.push({
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
include: path.resolve(__dirname, '../app/javascript'),
});
return newConfig;
},
};
+44
View File
@@ -0,0 +1,44 @@
import { addDecorator } from '@storybook/vue';
import Vue from 'vue';
import Vuex from 'vuex';
import VueI18n from 'vue-i18n';
import Vuelidate from 'vuelidate';
import Multiselect from 'vue-multiselect';
import FluentIcon from 'shared/components/FluentIcon/DashboardIcon';
import WootUiKit from '../app/javascript/dashboard/components';
import i18n from '../app/javascript/dashboard/i18n';
import '../app/javascript/dashboard/assets/scss/storybook.scss';
Vue.use(VueI18n);
Vue.use(Vuelidate);
Vue.use(WootUiKit);
Vue.use(Vuex);
Vue.component('multiselect', Multiselect);
Vue.component('fluent-icon', FluentIcon);
const store = new Vuex.Store({});
const i18nConfig = new VueI18n({
locale: 'en',
messages: i18n,
});
addDecorator(() => ({
template: '<story/>',
i18n: i18nConfig,
store,
beforeCreate: function() {
this.$root._i18n = this.$i18n;
},
}));
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
+128
View File
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
hello@chatwoot.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
+5
View File
@@ -0,0 +1,5 @@
# Contributing to Chatwoot
Thanks for taking the time to contribute! :tada::+1:
Please refer to our [Contributing Guide](https://www.chatwoot.com/docs/contributing-guide) for detailed instructions on how to contribute.
+88 -25
View File
@@ -1,14 +1,14 @@
source 'https://rubygems.org'
ruby '2.7.1'
ruby '3.0.4'
##-- base gems for rails --##
gem 'rack-cors', require: 'rack/cors'
gem 'rails'
gem 'rails', '~>6.1'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', require: false
##-- rails helper gems --##
##-- rails application helper gems --##
gem 'acts-as-taggable-on'
gem 'attr_extras'
gem 'browser'
@@ -23,28 +23,46 @@ gem 'tzinfo-data'
gem 'valid_email2'
# compress javascript config.assets.js_compressor
gem 'uglifier'
##-- used for single column multiple binary flags in notification settings/feature flagging --##
gem 'flag_shih_tzu'
# Random name generator for user names
gem 'haikunator'
# Template parsing safely
gem 'liquid'
# Parse Markdown to HTML
gem 'commonmarker'
# Validate Data against JSON Schema
gem 'json_schemer'
# Rack middleware for blocking & throttling abusive requests
gem 'rack-attack'
# a utility tool for streaming, flexible and safe downloading of remote files
gem 'down', '~> 5.0'
##-- for active storage --##
gem 'aws-sdk-s3', require: false
gem 'azure-storage-blob', require: false
gem 'google-cloud-storage', require: false
gem 'mini_magick'
gem 'image_processing', '~> 1.12.2'
##-- gems for database --#
gem 'groupdate'
gem 'pg'
gem 'redis'
gem 'redis-namespace'
gem 'redis-rack-cache'
# super fast record imports in bulk
gem 'activerecord-import'
##--- gems for server & infra configuration ---##
gem 'dotenv-rails'
gem 'foreman'
gem 'puma'
gem 'webpacker'
gem 'webpacker', '~> 5.x'
# metrics on heroku
gem 'barnes'
##--- gems for authentication & authorization ---##
gem 'devise'
gem 'devise-secure_password', '~> 2.0', git: 'https://github.com/chatwoot/devise-secure_password'
gem 'devise_token_auth'
# authorization
gem 'jwt'
@@ -57,9 +75,10 @@ gem 'administrate'
gem 'wisper', '2.0.0'
##--- gems for channels ---##
# TODO: bump up gem to 2.0
gem 'facebook-messenger'
gem 'telegram-bot-ruby'
gem 'twilio-ruby', '~> 5.32.0'
gem 'line-bot-api'
gem 'twilio-ruby', '~> 5.66'
# twitty will handle subscription of twitter account events
# gem 'twitty', git: 'https://github.com/chatwoot/twitty'
gem 'twitty'
@@ -67,25 +86,56 @@ gem 'twitty'
gem 'koala'
# slack client
gem 'slack-ruby-client'
# Random name generator
gem 'haikunator'
# for dialogflow integrations
gem 'google-cloud-dialogflow'
##--- gems for debugging and error reporting ---##
# static analysis
gem 'brakeman'
##-- apm and error monitoring ---#
gem 'ddtrace'
gem 'elastic-apm'
gem 'newrelic_rpm'
gem 'scout_apm'
gem 'sentry-raven'
gem 'sentry-rails', '~> 5.3'
gem 'sentry-ruby', '~> 5.3'
gem 'sentry-sidekiq', '~> 5.3'
##-- background job processing --##
gem 'sidekiq'
##-- used for single column multiple binary flags in notification settings/feature flagging --##
gem 'flag_shih_tzu'
gem 'sidekiq', '~> 6.4.0'
# We want cron jobs
gem 'sidekiq-cron', '~> 1.3'
##-- Push notification service --##
gem 'fcm'
gem 'webpush'
##-- geocoding / parse location from ip --##
# http://www.rubygeocoder.com/
gem 'geocoder'
# to parse maxmind db
gem 'maxminddb'
# to create db triggers
gem 'hairtrigger'
gem 'procore-sift'
# parse email
gem 'email_reply_trimmer'
gem 'html2text'
# to calculate working hours
gem 'working_hours'
# full text search for articles
gem 'pg_search'
# Subscriptions, Billing
gem 'stripe'
group :production, :staging do
# we dont want request timing out in development while using byebug
gem 'rack-timeout'
end
group :development do
gem 'annotate'
gem 'bullet'
@@ -93,29 +143,42 @@ group :development do
gem 'web-console'
# used in swagger build
gem 'json_refs', git: 'https://github.com/tzmfreedom/json_refs', ref: 'e32deb0'
gem 'json_refs'
# When we want to squash migrations
gem 'squasher'
end
group :test do
# Cypress in rails.
gem 'cypress-on-rails', '~> 1.0'
# fast cleaning of database
gem 'database_cleaner'
# mock http calls
gem 'webmock'
end
group :development, :test do
# locking until https://github.com/codeclimate/test-reporter/issues/418 is resolved
gem 'action-cable-testing'
gem 'active_record_query_trace'
##--- gems for debugging and error reporting ---##
# static analysis
gem 'brakeman'
gem 'bundle-audit', require: false
gem 'byebug', platform: :mri
gem 'climate_control'
gem 'factory_bot_rails'
gem 'faker'
gem 'listen'
gem 'mock_redis', git: 'https://github.com/sds/mock_redis', ref: '16d00789f0341a3aac35126c0ffe97a596753ff9'
gem 'mock_redis'
gem 'pry-rails'
gem 'rspec-rails', '~> 4.0.0.beta2'
gem 'rspec-rails', '~> 5.0.0'
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
gem 'scss_lint', require: false
gem 'seed_dump'
gem 'shoulda-matchers'
gem 'simplecov', '0.17.1', require: false
gem 'spring'
gem 'spring-watcher-listen'
gem 'webmock'
end
+534 -355
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -1,6 +1,10 @@
The MIT License (MIT)
Copyright (c) 2017-2021 Chatwoot Inc.
Copyright (c) 2017-2020 ThoughtWoot Inc.
Portions of this software are licensed as follows:
* All content that resides under the "enterprise/" directory of this repository, if that directory exists, is licensed under the license defined in "enterprise/LICENSE".
* All third party components incorporated into the Chatwoot Software are licensed under the original license provided by the owner of the applicable component.
* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+1 -1
View File
@@ -1,3 +1,3 @@
release: bundle exec rails db:prepare
release: bundle exec rails db:chatwoot_prepare
web: bin/rails server -p $PORT -e $RAILS_ENV
worker: bundle exec sidekiq -C config/sidekiq.yml
+3
View File
@@ -0,0 +1,3 @@
backend: RAILS_ENV=test bin/rails s -p 5050
frontend: bin/webpack-dev-server
worker: RAILS_ENV=test bundle exec sidekiq -C config/sidekiq.yml
+76 -20
View File
@@ -1,13 +1,15 @@
<p align="center">
<img src="https://s3.us-west-2.amazonaws.com/gh-assets.chatwoot.com/brand.svg" alt="Woot-logo" width="240">
<img src="https://s3.us-west-2.amazonaws.com/gh-assets.chatwoot.com/brand.svg" alt="Woot-logo" width="240" />
<div align="center">A simple and elegant live chat software</div>
<div align="center">An opensource alternative to Intercom, Zendesk, Drift, Crisp etc.</div>
<p align="center">Customer engagement suite, an open-source alternative to Intercom, Zendesk, Salesforce Service Cloud etc.</p>
</p>
<p align="center">
<a href="https://heroku.com/deploy?template=https://github.com/chatwoot/chatwoot/tree/master" alt="Deploy to Heroku">
<img alt="Deploy" src="https://www.herokucdn.com/deploy/button.svg"/>
<img width="150" alt="Deploy" src="https://www.herokucdn.com/deploy/button.svg"/>
</a>
<a href="https://marketplace.digitalocean.com/apps/chatwoot?refcode=f2238426a2a8" alt="Deploy to DigitalOcean">
<img width="200" alt="Deploy to DO" src="https://www.deploytodo.com/do-btn-blue.svg"/>
</a>
</p>
@@ -16,45 +18,99 @@ ___
<p align="center">
<a href="https://codeclimate.com/github/chatwoot/chatwoot/maintainability"><img src="https://api.codeclimate.com/v1/badges/80f9e1a7c72d186289ad/maintainability" alt="Maintainability"></a>
<img src="https://img.shields.io/circleci/build/github/chatwoot/chatwoot" alt="CircleCI Badge">
<a href="https://hub.docker.com/r/chatwoot/chatwoot/"><img src="https://img.shields.io/docker/pulls/chatwoot/chatwoot" alt="Docker Pull Badge"></a>
<a href="https://hub.docker.com/r/chatwoot/chatwoot/"><img src="https://img.shields.io/docker/cloud/build/chatwoot/chatwoot" alt="Docker Build Badge"></a>
<img src="https://img.shields.io/github/license/chatwoot/chatwoot" alt="License">
<img src="https://img.shields.io/github/commit-activity/m/chatwoot/chatwoot" alt="Commits-per-month">
<a title="Crowdin" target="_self" href="https://chatwoot.crowdin.com/chatwoot"><img src="https://badges.crowdin.net/e/37ced7eba411064bd792feb3b7a28b16/localized.svg"></a>
<a href="https://discord.gg/cJXdrwS"><img src="https://img.shields.io/discord/647412545203994635" alt="Discord"></a>
<a href="https://huntr.dev/bounties/disclose"><img src="https://cdn.huntr.dev/huntr_security_badge_mono.svg" alt="Huntr"></a>
<a href="https://status.chatwoot.com"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fchatwoot%2Fstatus%2Fmaster%2Fapi%2Fchatwoot%2Fuptime.json" alt="uptime"></a>
<a href="https://status.chatwoot.com"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fchatwoot%2Fstatus%2Fmaster%2Fapi%2Fchatwoot%2Fresponse-time.json" alt="response time"></a>
<a href="https://artifacthub.io/packages/helm/chatwoot/chatwoot"><img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/artifact-hub" alt="Artifact HUB"></a>
</p>
![ChatUI progess](https://s3.us-west-2.amazonaws.com/gh-assets.chatwoot.com/chatwoot-dashboard-assets.png)
<img src="https://chatwoot-public-assets.s3.amazonaws.com/github/screenshot.png" width="100%" alt="Chat dashboard"/>
## Background
Chatwoot is a customer support tool for instant messaging channels which can help businesses to provide exceptional customer support. The development of Chatwoot started in 2016 and it failed to succeed as a business and eventually shut the shop in 2017. During 2019 #Hacktoberfest, the maintainers decided to make it opensource instead of letting the code rust in a private repo. With a pleasant surprise, Chatwoot became a trending project on Hacker News and best of all, got lots of love from the community.
Now, a failed project is back on track and the prospects are looking great. The team is back to working on the project and we are building it in the open. Thanks to the ideas and contributions from the community.
Chatwoot is an open-source, self-hosted customer engagement suite. Chatwoot lets you view and manage your customer data, communicate with them irrespective of which medium they use, and re-engage them based on their profile.
## Features
Chatwoot supports the following conversation channels:
- **Website**: Talk to your customers using our live chat widget and make use of our SDK to identify a user and provide contextual support.
- **Facebook**: Connect your Facebook pages and start replying to the direct messages to your page.
- **Instagram**: Connect your Instagram profile and start replying to the direct messages.
- **Twitter**: Connect your Twitter profiles and reply to direct messages or the tweets where you are mentioned.
- **Telegram**: Connect your Telegram bot and reply to your customers right from a single dashboard.
- **WhatsApp**: Connect your WhatsApp business account and manage the conversation in Chatwoot.
- **Line**: Connect your Line account and manage the conversations in Chatwoot.
- **SMS**: Connect your Twilio SMS account and reply to the SMS queries in Chatwoot.
- **API Channel**: Build custom communication channels using our API channel.
- **Email**: Forward all your email queries to Chatwoot and view it in our integrated dashboard.
And more.
Other features include:
- **CRM**: Save all your customer information right inside Chatwoot, use contact notes to log emails, phone calls, or meeting notes.
- **Custom Attributes**: Define custom attribute attributes to store information about a contact or a conversation and extend the product to match your workflow.
- **Shared multi-brand inboxes**: Manage multiple brands or pages using a shared inbox.
- **Private notes**: Use @mentions and private notes to communicate internally about a conversation.
- **Canned responses (Saved replies)**: Improve the response rate by adding saved replies for frequently asked questions.
- **Conversation Labels**: Use conversation labels to create custom workflows.
- **Auto assignment**: Chatwoot intelligently assigns a ticket to the agents who have access to the inbox depending on their availability and load.
- **Conversation continuity**: If the user has provided an email address through the chat widget, Chatwoot will send an email to the customer under the agent name so that the user can continue the conversation over the email.
- **Multi-lingual support**: Chatwoot supports 10+ languages.
- **Powerful API & Webhooks**: Extend the capability of the software using Chatwoots webhooks and APIs.
- **Integrations**: Chatwoot natively integrates with Slack right now. Manage your conversations in Slack without logging into the dashboard.
## Documentation
Detailed documentation is available at [www.chatwoot.com/docs](https://www.chatwoot.com/docs).
Detailed documentation is available at [chatwoot.com/help-center](https://www.chatwoot.com/help-center).
You can find the quick setup docs [here](https://www.chatwoot.com/docs/quick-setup).
## Translation process
The translation process for Chatwoot web and mobile app is managed at [https://translate.chatwoot.com](https://translate.chatwoot.com) using Crowdin. Please read the [translation guide](https://www.chatwoot.com/docs/contributing/translating-chatwoot-to-your-language) for contributing to Chatwoot.
## Branching model
We use [git-flow](https://nvie.com/posts/a-successful-git-branching-model/) branching model. The base branch is `develop`.
If you are looking for a stable version, please use the `master` or tags labelled as `v1.x.x`.
We use the [git-flow](https://nvie.com/posts/a-successful-git-branching-model/) branching model. The base branch is `develop`.
If you are looking for a stable version, please use the `master` or tags labelled as `v1.x.x`.
## Heroku one-click deploy
## Deployment
Deploying chatwoot to heroku, it's a breeze. It's as simple as clicking this button.
### Heroku one-click deploy
Deploying Chatwoot to Heroku is a breeze. It's as simple as clicking this button:
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/chatwoot/chatwoot/tree/master)
Follow this [link](https://www.chatwoot.com/docs/environment-variables) to understand setting the correct environment variables for the app to work with all the features. There might be breakages if you do not set the relevant environment variables. This applies to deploying the docker image as well.
Follow this [link](https://www.chatwoot.com/docs/environment-variables) to understand setting the correct environment variables for the app to work with all the features. There might be breakages if you do not set the relevant environment variables.
## Docker
Follow our [docker development guide](https://www.chatwoot.com/docs/installation-guide-docker) to develop and debug the application using `docker-compose`.
### DigitalOcean 1-Click Kubernetes deployment
Chatwoot now supports 1-Click deployment to DigitalOcean as a kubernetes app.
<a href="https://marketplace.digitalocean.com/apps/chatwoot?refcode=f2238426a2a8" alt="Deploy to DigitalOcean">
<img width="200" alt="Deploy to DO" src="https://www.deploytodo.com/do-btn-blue.svg"/>
</a>
### Other deployment options
For other supported options, checkout our [deployment page](https://chatwoot.com/deploy).
## Security
Looking to report a vulnerability? Please refer our [SECURITY.md](./SECURITY.md) file.
## Community? Questions? Support ?
If you need help or just want to hang out, come, say hi on our [Discord](https://discord.gg/cJXdrwS) server.
Follow our [environment variables](https://www.chatwoot.com/docs/environment-variables/) guide to setup environment for Docker.
## Contributors ✨
@@ -63,4 +119,4 @@ Thanks goes to all these [wonderful people](https://www.chatwoot.com/docs/contri
<a href="https://github.com/chatwoot/chatwoot/graphs/contributors"><img src="https://opencollective.com/chatwoot/contributors.svg?width=890&button=false" /></a>
*Chatwoot* &copy; 2017-2020, ThoughtWoot Inc - Released under the MIT License.
*Chatwoot* &copy; 2017-2022, Chatwoot Inc - Released under the MIT License.
+31
View File
@@ -0,0 +1,31 @@
# Security Policy
Chatwoot is looking forward to working with security researchers across the world to keep Chatwoot and our users safe. If you have found an issue in our systems/applications, please reach out to us.
## Reporting a Vulnerability
We use [huntr.dev](https://huntr.dev/) for security issues that affect our project. If you believe you have found a vulnerability, please disclose it via this [form](https://huntr.dev/bounties/disclose).
This will enable us to review the vulnerability, fix it promptly, and reward you for your efforts.
If you have any questions about the process, feel free to reach out to security@chatwoot.com.
## Out of scope
Please do not perform testing against Chatwoot production services. Use a self hosted instance to perform tests.
We consider the following to be out of scope, though there may be exceptions.
- Missing HTTP security headers
- Self XSS
- HTTP Host Header XSS without working proof-of-concept
- Incomplete/Missing SPF/DKIM
- Denial of Service attacks
- DNSSEC
- Social Engineering attacks
If you are not sure about the scope, please create a report.
## Thanks
Thank you for keeping Chatwoot and our users safe. 🙇
+1
View File
@@ -0,0 +1 @@
2.6.0
+1
View File
@@ -0,0 +1 @@
2.1.0
+13 -1
View File
@@ -11,7 +11,7 @@
"rails",
"vue"
],
"success_url": "/app/login",
"success_url": "/",
"env": {
"SECRET_TOKEN": {
"description": "A secret key for verifying the integrity of signed cookies.",
@@ -28,12 +28,24 @@
"FRONTEND_URL": {
"description": "Public root URL of the Chatwoot installation. This will be used in the emails.",
"value": "https://CHANGE.herokuapp.com"
},
"INSTALLATION_ENV": {
"description": "Installation method used for Chatwoot.",
"value": "heroku"
},
"REDIS_OPENSSL_VERIFY_MODE":{
"description": "OpenSSL verification mode for Redis connections. ref https://help.heroku.com/HC0F8CUS/redis-connection-issues",
"value": "none"
}
},
"formation": {
"web": {
"quantity": 1,
"size": "FREE"
},
"worker": {
"quantity": 1,
"size": "FREE"
}
},
"image": "heroku/ruby",
+93 -9
View File
@@ -1,10 +1,20 @@
# retain_original_contact_name: false / true
# In case of setUser we want to update the name of the identified contact,
# which is the default behaviour
#
# But, In case of contact merge during prechat form contact update.
# We don't want to update the name of the identified original contact.
class ContactIdentifyAction
pattr_initialize [:contact!, :params!]
pattr_initialize [:contact!, :params!, { retain_original_contact_name: false, discard_invalid_attrs: false }]
def perform
@attributes_to_update = [:identifier, :name, :email, :phone_number]
ActiveRecord::Base.transaction do
@contact = merge_contact(existing_identified_contact, @contact) if merge_contacts?(existing_identified_contact, @contact)
@contact = merge_contact(existing_email_contact, @contact) if merge_contacts?(existing_email_contact, @contact)
merge_if_existing_identified_contact
merge_if_existing_email_contact
merge_if_existing_phone_number_contact
update_contact
end
@contact
@@ -16,32 +26,106 @@ class ContactIdentifyAction
@account ||= @contact.account
end
def merge_if_existing_identified_contact
return unless merge_contacts?(existing_identified_contact, :identifier)
process_contact_merge(existing_identified_contact)
end
def merge_if_existing_email_contact
return unless merge_contacts?(existing_email_contact, :email)
process_contact_merge(existing_email_contact)
end
def merge_if_existing_phone_number_contact
return unless merge_contacts?(existing_phone_number_contact, :phone_number)
return unless mergable_phone_contact?
process_contact_merge(existing_phone_number_contact)
end
def process_contact_merge(mergee_contact)
@contact = merge_contact(mergee_contact, @contact)
@attributes_to_update.delete(:name) if retain_original_contact_name
end
def existing_identified_contact
return if params[:identifier].blank?
@existing_identified_contact ||= Contact.where(account_id: account.id).find_by(identifier: params[:identifier])
@existing_identified_contact ||= account.contacts.find_by(identifier: params[:identifier])
end
def existing_email_contact
return if params[:email].blank?
@existing_email_contact ||= Contact.where(account_id: account.id).find_by(email: params[:email])
@existing_email_contact ||= account.contacts.find_by(email: params[:email])
end
def merge_contacts?(existing_contact, _contact)
existing_contact && existing_contact.id != @contact.id
def existing_phone_number_contact
return if params[:phone_number].blank?
@existing_phone_number_contact ||= account.contacts.find_by(phone_number: params[:phone_number])
end
def merge_contacts?(existing_contact, key)
return if existing_contact.blank?
return true if params[:identifier].blank?
# we want to prevent merging contacts with different identifiers
if existing_contact.identifier.present? && existing_contact.identifier != params[:identifier]
# we will remove attribute from update list
@attributes_to_update.delete(key)
return false
end
true
end
# case: contact 1: email: 1@test.com, phone: 123456789
# params: email: 2@test.com, phone: 123456789
# we don't want to overwrite 1@test.com since email parameter takes higer priority
def mergable_phone_contact?
return true if params[:email].blank?
if existing_phone_number_contact.email.present? && existing_phone_number_contact.email != params[:email]
@attributes_to_update.delete(:phone_number)
return false
end
true
end
def update_contact
@contact.update!(params.slice(:name, :email, :identifier))
ContactAvatarJob.perform_later(@contact, params[:avatar_url]) if params[:avatar_url].present?
@contact.attributes = params.slice(*@attributes_to_update).reject do |_k, v|
v.blank?
end.merge({ custom_attributes: custom_attributes, additional_attributes: additional_attributes })
# blank identifier or email will throw unique index error
# TODO: replace reject { |_k, v| v.blank? } with compact_blank when rails is upgraded
@contact.discard_invalid_attrs if discard_invalid_attrs
@contact.save!
Avatar::AvatarFromUrlJob.perform_later(@contact, params[:avatar_url]) if params[:avatar_url].present?
end
def merge_contact(base_contact, merge_contact)
return base_contact if base_contact.id == merge_contact.id
ContactMergeAction.new(
account: account,
base_contact: base_contact,
mergee_contact: merge_contact
).perform
end
def custom_attributes
return @contact.custom_attributes if params[:custom_attributes].blank?
(@contact.custom_attributes || {}).deep_merge(params[:custom_attributes].stringify_keys)
end
def additional_attributes
return @contact.additional_attributes if params[:additional_attributes].blank?
(@contact.additional_attributes || {}).deep_merge(params[:additional_attributes].stringify_keys)
end
end
+17 -2
View File
@@ -1,13 +1,18 @@
class ContactMergeAction
include Events::Types
pattr_initialize [:account!, :base_contact!, :mergee_contact!]
def perform
# This case happens when an agent updates a contact email in dashboard,
# while the contact also update his email via email collect box
return @base_contact if base_contact.id == mergee_contact.id
ActiveRecord::Base.transaction do
validate_contacts
merge_conversations
merge_messages
merge_contact_inboxes
remove_mergee_contact
merge_and_remove_mergee_contact
end
@base_contact
end
@@ -36,7 +41,17 @@ class ContactMergeAction
ContactInbox.where(contact_id: @mergee_contact.id).update(contact_id: @base_contact.id)
end
def remove_mergee_contact
def merge_and_remove_mergee_contact
mergable_attribute_keys = %w[identifier name email phone_number additional_attributes custom_attributes]
base_contact_attributes = base_contact.attributes.slice(*mergable_attribute_keys).compact_blank
mergee_contact_attributes = mergee_contact.attributes.slice(*mergable_attribute_keys).compact_blank
# attributes in base contact are given preference
merged_attributes = mergee_contact_attributes.deep_merge(base_contact_attributes)
@mergee_contact.destroy!
Rails.configuration.dispatcher.dispatch(CONTACT_MERGED, Time.zone.now, contact: @base_contact,
tokens: [@base_contact.contact_inboxes.filter_map(&:pubsub_token)])
@base_contact.update!(merged_attributes)
end
end
@@ -1,6 +1,6 @@
.logo-brand {
margin-bottom: $space-normal;
padding: $space-normal $space-smaller;
padding: $space-normal $space-smaller $space-small;
text-align: center;
}
@@ -70,3 +70,9 @@
left: $space-normal;
position: fixed;
}
.app-version {
color: $color-gray;
font-size: $font-size-small;
padding-top: $space-smaller;
}
@@ -13,6 +13,7 @@ html {
line-height: 1.15; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
-moz-osx-font-smoothing: grayscale;
}
/* Sections
@@ -43,7 +43,7 @@ $woot-logo-padding: $space-large $space-two;
// Colors
$color-woot: #1f93ff;
$color-gray: #6e6f73;
$color-light-gray: #999a9b;
$color-light-gray: #747677;
$color-border: #e0e6ed;
$color-border-light: #f0f4f5;
$color-background: #f4f6fb;
@@ -55,7 +55,7 @@ $color-heading: #1f2d3d;
$color-extra-light-blue: #f5f7f9;
$primary-color: $color-woot;
$secondary-color: #35c5ff;
$secondary-color: #5d7592;
$success-color: #44ce4b;
$warning-color: #ffc532;
$alert-color: #ff382d;
-22
View File
@@ -1,22 +0,0 @@
require 'facebook/messenger'
class FacebookBot
include Facebook::Messenger
Bot.on :message do |message|
Rails.logger.info "MESSAGE_RECIEVED #{message}"
response = ::Integrations::Facebook::MessageParser.new(message)
::Integrations::Facebook::MessageCreator.new(response).perform
end
Bot.on :delivery do |delivery|
# delivery.ids # => 'mid.1457764197618:41d102a3e1ae206a38'
# delivery.sender # => { 'id' => '1008372609250235' }
# delivery.recipient # => { 'id' => '2015573629214912' }
# delivery.at # => 2016-04-22 21:30:36 +0200
# delivery.seq # => 37
updater = Integrations::Facebook::DeliveryStatus.new(delivery)
updater.perform
Rails.logger.info "Human was online at #{delivery.at}"
end
end
+17 -16
View File
@@ -2,17 +2,19 @@
class AccountBuilder
include CustomExceptions::Account
pattr_initialize [:account_name!, :email!, :confirmed!]
pattr_initialize [:account_name!, :email!, :confirmed, :user, :user_full_name, :user_password, :super_admin, :locale]
def perform
validate_email
validate_user
if @user.nil?
validate_email
validate_user
end
ActiveRecord::Base.transaction do
@account = create_account
@user = create_and_link_user
end
[@user, @account]
rescue StandardError => e
@account&.destroy
puts e.inspect
raise e
end
@@ -24,7 +26,7 @@ class AccountBuilder
if address.valid? # && !address.disposable?
true
else
raise InvalidEmail.new(valid: address.valid?) # , disposable: address.disposable?})
raise InvalidEmail.new(valid: address.valid?)
end
end
@@ -37,18 +39,12 @@ class AccountBuilder
end
def create_account
@account = Account.create!(name: @account_name)
@account = Account.create!(name: @account_name, locale: I18n.locale)
Current.account = @account
end
def create_and_link_user
password = Time.now.to_i
@user = User.new(email: @email,
password: password,
password_confirmation: password,
name: email_to_name(@email))
@user.confirm if @confirmed
if @user.save!
if @user.present? || create_user
link_user_to_account(@user, @account)
@user
else
@@ -64,8 +60,13 @@ class AccountBuilder
)
end
def email_to_name(email)
name = email[/[^@]+/]
name.split('.').map(&:capitalize).join(' ')
def create_user
@user = User.new(email: @email,
password: user_password,
password_confirmation: user_password,
name: @user_full_name)
@user.type = 'SuperAdmin' if @super_admin
@user.confirm if @confirmed
@user.save!
end
end
@@ -0,0 +1,43 @@
class Campaigns::CampaignConversationBuilder
pattr_initialize [:contact_inbox_id!, :campaign_display_id!, :conversation_additional_attributes, :custom_attributes]
def perform
@contact_inbox = ContactInbox.find(@contact_inbox_id)
@campaign = @contact_inbox.inbox.campaigns.find_by!(display_id: campaign_display_id)
ActiveRecord::Base.transaction do
@contact_inbox.lock!
# We won't send campaigns if a conversation is already present
raise 'Conversation alread present' if @contact_inbox.reload.conversations.present?
@conversation = ::Conversation.create!(conversation_params)
Messages::MessageBuilder.new(@campaign.sender, @conversation, message_params).perform
end
@conversation
rescue StandardError => e
Rails.logger.info(e.message)
nil
end
private
def message_params
ActionController::Parameters.new({
content: @campaign.message,
campaign_id: @campaign.id
})
end
def conversation_params
{
account_id: @campaign.account_id,
inbox_id: @contact_inbox.inbox_id,
contact_id: @contact_inbox.contact_id,
contact_inbox_id: @contact_inbox.id,
campaign_id: @campaign.id,
additional_attributes: conversation_additional_attributes,
custom_attributes: custom_attributes || {}
}
end
end
+44 -14
View File
@@ -1,11 +1,11 @@
class ContactBuilder
pattr_initialize [:source_id!, :inbox!, :contact_attributes!]
pattr_initialize [:source_id!, :inbox!, :contact_attributes!, :hmac_verified]
def perform
contact_inbox = inbox.contact_inboxes.find_by(source_id: source_id)
return contact_inbox if contact_inbox
build_contact
build_contact_inbox
end
private
@@ -15,7 +15,7 @@ class ContactBuilder
end
def create_contact_inbox(contact)
::ContactInbox.create!(
::ContactInbox.create_with(hmac_verified: hmac_verified || false).find_or_create_by!(
contact_id: contact.id,
inbox_id: inbox.id,
source_id: source_id
@@ -23,24 +23,54 @@ class ContactBuilder
end
def update_contact_avatar(contact)
::ContactAvatarJob.perform_later(contact, contact_attributes[:avatar_url]) if contact_attributes[:avatar_url]
::Avatar::AvatarFromUrlJob.perform_later(contact, contact_attributes[:avatar_url]) if contact_attributes[:avatar_url]
end
def build_contact
ActiveRecord::Base.transaction do
contact = account.contacts.create!(
name: contact_attributes[:name],
phone_number: contact_attributes[:phone_number],
email: contact_attributes[:email],
identifier: contact_attributes[:identifier],
additional_attributes: contact_attributes[:additional_attributes]
)
def create_contact
account.contacts.create!(
name: contact_attributes[:name] || ::Haikunator.haikunate(1000),
phone_number: contact_attributes[:phone_number],
email: contact_attributes[:email],
identifier: contact_attributes[:identifier],
additional_attributes: contact_attributes[:additional_attributes],
custom_attributes: contact_attributes[:custom_attributes]
)
end
def find_contact
contact = find_contact_by_identifier(contact_attributes[:identifier])
contact ||= find_contact_by_email(contact_attributes[:email])
contact ||= find_contact_by_phone_number(contact_attributes[:phone_number])
contact
end
def find_contact_by_identifier(identifier)
return if identifier.blank?
account.contacts.find_by(identifier: identifier)
end
def find_contact_by_email(email)
return if email.blank?
account.contacts.find_by(email: email.downcase)
end
def find_contact_by_phone_number(phone_number)
return if phone_number.blank?
account.contacts.find_by(phone_number: phone_number)
end
def build_contact_inbox
ActiveRecord::Base.transaction do
contact = find_contact || create_contact
contact_inbox = create_contact_inbox(contact)
update_contact_avatar(contact)
contact_inbox
rescue StandardError => e
Rails.logger.info e
Rails.logger.error e
raise e
end
end
end
+55
View File
@@ -0,0 +1,55 @@
class ContactInboxBuilder
pattr_initialize [:contact_id!, :inbox_id!, :source_id]
def perform
@contact = Contact.find(contact_id)
@inbox = @contact.account.inboxes.find(inbox_id)
return unless ['Channel::TwilioSms', 'Channel::Sms', 'Channel::Email', 'Channel::Api', 'Channel::Whatsapp'].include? @inbox.channel_type
source_id = @source_id || generate_source_id
create_contact_inbox(source_id) if source_id.present?
end
private
def generate_source_id
case @inbox.channel_type
when 'Channel::TwilioSms'
twilio_source_id
when 'Channel::Whatsapp'
wa_source_id
when 'Channel::Email'
@contact.email
when 'Channel::Sms'
@contact.phone_number
when 'Channel::Api'
SecureRandom.uuid
end
end
def wa_source_id
return unless @contact.phone_number
# whatsapp doesn't want the + in e164 format
"#{@contact.phone_number}.delete('+')"
end
def twilio_source_id
return unless @contact.phone_number
case @inbox.channel.medium
when 'sms'
@contact.phone_number
when 'whatsapp'
"whatsapp:#{@contact.phone_number}"
end
end
def create_contact_inbox(source_id)
::ContactInbox.find_or_create_by!(
contact_id: @contact.id,
inbox_id: @inbox.id,
source_id: source_id
)
end
end
@@ -0,0 +1,28 @@
class CsatSurveys::ResponseBuilder
pattr_initialize [:message]
def perform
raise 'Invalid Message' unless message.input_csat?
conversation = message.conversation
rating = message.content_attributes.dig('submitted_values', 'csat_survey_response', 'rating')
feedback_message = message.content_attributes.dig('submitted_values', 'csat_survey_response', 'feedback_message')
return if rating.blank?
process_csat_response(conversation, rating, feedback_message)
end
private
def process_csat_response(conversation, rating, feedback_message)
csat_survey_response = message.csat_survey_response || CsatSurveyResponse.new(
message_id: message.id, account_id: message.account_id, conversation_id: message.conversation_id,
contact_id: conversation.contact_id, assigned_agent: conversation.assignee
)
csat_survey_response.rating = rating
csat_survey_response.feedback_message = feedback_message
csat_survey_response.save!
csat_survey_response
end
end
@@ -0,0 +1,138 @@
# This class creates both outgoing messages from chatwoot and echo outgoing messages based on the flag `outgoing_echo`
# Assumptions
# 1. Incase of an outgoing message which is echo, source_id will NOT be nil,
# based on this we are showing "not sent from chatwoot" message in frontend
# Hence there is no need to set user_id in message for outgoing echo messages.
class Messages::Facebook::MessageBuilder < Messages::Messenger::MessageBuilder
attr_reader :response
def initialize(response, inbox, outgoing_echo: false)
super()
@response = response
@inbox = inbox
@outgoing_echo = outgoing_echo
@sender_id = (@outgoing_echo ? @response.recipient_id : @response.sender_id)
@message_type = (@outgoing_echo ? :outgoing : :incoming)
@attachments = (@response.attachments || [])
end
def perform
# This channel might require reauthorization, may be owner might have changed the fb password
return if @inbox.channel.reauthorization_required?
ActiveRecord::Base.transaction do
build_contact
build_message
end
ensure_contact_avatar
rescue Koala::Facebook::AuthenticationError
@inbox.channel.authorization_error!
rescue StandardError => e
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception
true
end
private
def contact
@contact ||= @inbox.contact_inboxes.find_by(source_id: @sender_id)&.contact
end
def build_contact
return if contact.present?
@contact = Contact.create!(contact_params.except(:remote_avatar_url))
@contact_inbox = ContactInbox.find_or_create_by!(contact: contact, inbox: @inbox, source_id: @sender_id)
end
def build_message
@message = conversation.messages.create!(message_params)
@attachments.each do |attachment|
process_attachment(attachment)
end
end
def ensure_contact_avatar
return if contact_params[:remote_avatar_url].blank?
return if @contact.avatar.attached?
Avatar::AvatarFromUrlJob.perform_later(@contact, contact_params[:remote_avatar_url])
end
def conversation
@conversation ||= Conversation.find_by(conversation_params) || build_conversation
end
def build_conversation
@contact_inbox ||= contact.contact_inboxes.find_by!(source_id: @sender_id)
Conversation.create!(conversation_params.merge(
contact_inbox_id: @contact_inbox.id
))
end
def location_params(attachment)
lat = attachment['payload']['coordinates']['lat']
long = attachment['payload']['coordinates']['long']
{
external_url: attachment['url'],
coordinates_lat: lat,
coordinates_long: long,
fallback_title: attachment['title']
}
end
def fallback_params(attachment)
{
fallback_title: attachment['title'],
external_url: attachment['url']
}
end
def conversation_params
{
account_id: @inbox.account_id,
inbox_id: @inbox.id,
contact_id: contact.id
}
end
def message_params
{
account_id: conversation.account_id,
inbox_id: conversation.inbox_id,
message_type: @message_type,
content: response.content,
source_id: response.identifier,
sender: @outgoing_echo ? nil : contact
}
end
def process_contact_params_result(result)
{
name: "#{result['first_name'] || 'John'} #{result['last_name'] || 'Doe'}",
account_id: @inbox.account_id,
remote_avatar_url: result['profile_pic'] || ''
}
end
def contact_params
begin
k = Koala::Facebook::API.new(@inbox.channel.page_access_token) if @inbox.facebook?
result = k.get_object(@sender_id) || {}
rescue Koala::Facebook::AuthenticationError
@inbox.channel.authorization_error!
raise
rescue Koala::Facebook::ClientError => e
result = {}
# OAuthException, code: 100, error_subcode: 2018218, message: (#100) No profile available for this user
# We don't need to capture this error as we don't care about contact params in case of echo messages
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception unless @outgoing_echo
rescue StandardError => e
result = {}
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception
end
process_contact_params_result(result)
end
end
@@ -1,2 +0,0 @@
class Messages::IncomingMessageBuilder < Messages::MessageBuilder
end
@@ -0,0 +1,145 @@
# This class creates both outgoing messages from chatwoot and echo outgoing messages based on the flag `outgoing_echo`
# Assumptions
# 1. Incase of an outgoing message which is echo, source_id will NOT be nil,
# based on this we are showing "not sent from chatwoot" message in frontend
# Hence there is no need to set user_id in message for outgoing echo messages.
class Messages::Instagram::MessageBuilder < Messages::Messenger::MessageBuilder
attr_reader :messaging
def initialize(messaging, inbox, outgoing_echo: false)
super()
@messaging = messaging
@inbox = inbox
@outgoing_echo = outgoing_echo
end
def perform
return if @inbox.channel.reauthorization_required?
ActiveRecord::Base.transaction do
build_message
end
rescue Koala::Facebook::AuthenticationError
@inbox.channel.authorization_error!
raise
rescue StandardError => e
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception
true
end
private
def attachments
@messaging[:message][:attachments] || {}
end
def message_type
@outgoing_echo ? :outgoing : :incoming
end
def message_identifier
message[:mid]
end
def message_source_id
@outgoing_echo ? recipient_id : sender_id
end
def sender_id
@messaging[:sender][:id]
end
def recipient_id
@messaging[:recipient][:id]
end
def message
@messaging[:message]
end
def contact
@contact ||= @inbox.contact_inboxes.find_by(source_id: message_source_id)&.contact
end
def conversation
@conversation ||= Conversation.find_by(conversation_params) || build_conversation
end
def message_content
@messaging[:message][:text]
end
def build_message
return if @outgoing_echo && already_sent_from_chatwoot?
@message = conversation.messages.create!(message_params)
attachments.each do |attachment|
process_attachment(attachment)
end
end
def build_conversation
@contact_inbox ||= contact.contact_inboxes.find_by!(source_id: message_source_id)
Conversation.create!(conversation_params.merge(
contact_inbox_id: @contact_inbox.id
))
end
def conversation_params
{
account_id: @inbox.account_id,
inbox_id: @inbox.id,
contact_id: contact.id,
additional_attributes: {
type: 'instagram_direct_message'
}
}
end
def message_params
{
account_id: conversation.account_id,
inbox_id: conversation.inbox_id,
message_type: message_type,
source_id: message_identifier,
content: message_content,
sender: @outgoing_echo ? nil : contact
}
end
def already_sent_from_chatwoot?
cw_message = conversation.messages.where(
source_id: @messaging[:message][:mid]
).first
cw_message.present?
end
### Sample response
# {
# "object": "instagram",
# "entry": [
# {
# "id": "<IGID>",// ig id of the business
# "time": 1569262486134,
# "messaging": [
# {
# "sender": {
# "id": "<IGSID>"
# },
# "recipient": {
# "id": "<IGID>"
# },
# "timestamp": 1569262485349,
# "message": {
# "mid": "<MESSAGE_ID>",
# "text": "<MESSAGE_CONTENT>"
# }
# }
# ]
# }
# ],
# }
end
+68 -107
View File
@@ -1,139 +1,100 @@
# This class creates both outgoing messages from chatwoot and echo outgoing messages based on the flag `outgoing_echo`
# Assumptions
# 1. Incase of an outgoing message which is echo, source_id will NOT be nil,
# based on this we are showing "not sent from chatwoot" message in frontend
# Hence there is no need to set user_id in message for outgoing echo messages.
class Messages::MessageBuilder
attr_reader :response
include ::FileTypeHelper
attr_reader :message
def initialize(response, inbox, outgoing_echo = false)
@response = response
@inbox = inbox
@sender_id = (outgoing_echo ? @response.recipient_id : @response.sender_id)
@message_type = (outgoing_echo ? :outgoing : :incoming)
def initialize(user, conversation, params)
@params = params
@private = params[:private] || false
@conversation = conversation
@user = user
@message_type = params[:message_type] || 'outgoing'
@attachments = params[:attachments]
@automation_rule = @params&.dig(:content_attributes, :automation_rule_id)
return unless params.instance_of?(ActionController::Parameters)
@in_reply_to = params.to_unsafe_h&.dig(:content_attributes, :in_reply_to)
@items = params.to_unsafe_h&.dig(:content_attributes, :items)
end
def perform
ActiveRecord::Base.transaction do
build_contact
build_message
end
rescue StandardError => e
Raven.capture_exception(e)
true
@message = @conversation.messages.build(message_params)
process_attachments
process_emails
@message.save!
@message
end
private
def contact
@contact ||= @inbox.contact_inboxes.find_by(source_id: @sender_id)&.contact
end
def process_attachments
return if @attachments.blank?
def build_contact
return if contact.present?
@attachments.each do |uploaded_attachment|
attachment = @message.attachments.build(
account_id: @message.account_id,
file: uploaded_attachment
)
@contact = Contact.create!(contact_params.except(:remote_avatar_url))
ContactAvatarJob.perform_later(@contact, contact_params[:remote_avatar_url]) if contact_params[:remote_avatar_url]
@contact_inbox = ContactInbox.create(contact: contact, inbox: @inbox, source_id: @sender_id)
end
def build_message
@message = conversation.messages.create!(message_params)
(response.attachments || []).each do |attachment|
attachment_obj = @message.attachments.new(attachment_params(attachment).except(:remote_file_url))
attachment_obj.save!
attach_file(attachment_obj, attachment_params(attachment)[:remote_file_url]) if attachment_params(attachment)[:remote_file_url]
attachment.file_type = file_type(uploaded_attachment&.content_type) if uploaded_attachment.is_a?(ActionDispatch::Http::UploadedFile)
end
end
def attach_file(attachment, file_url)
file_resource = LocalResource.new(file_url)
attachment.file.attach(io: file_resource.file, filename: file_resource.tmp_filename, content_type: file_resource.encoding)
def process_emails
return unless @conversation.inbox&.inbox_type == 'Email'
cc_emails = @params[:cc_emails].split(',') if @params[:cc_emails]
bcc_emails = @params[:bcc_emails].split(',') if @params[:bcc_emails]
@message.content_attributes[:cc_emails] = cc_emails
@message.content_attributes[:bcc_emails] = bcc_emails
end
def conversation
@conversation ||= Conversation.find_by(conversation_params) || build_conversation
end
def build_conversation
@contact_inbox ||= contact.contact_inboxes.find_by!(source_id: @sender_id)
Conversation.create!(conversation_params.merge(
contact_inbox_id: @contact_inbox.id
))
end
def attachment_params(attachment)
file_type = attachment['type'].to_sym
params = { file_type: file_type, account_id: @message.account_id }
if [:image, :file, :audio, :video].include? file_type
params.merge!(file_type_params(attachment))
elsif file_type == :location
params.merge!(location_params(attachment))
elsif file_type == :fallback
params.merge!(fallback_params(attachment))
def message_type
if @conversation.inbox.channel_type != 'Channel::Api' && @message_type == 'incoming'
raise StandardError, 'Incoming messages are only allowed in Api inboxes'
end
params
@message_type
end
def file_type_params(attachment)
{
external_url: attachment['payload']['url'],
remote_file_url: attachment['payload']['url']
}
def sender
message_type == 'outgoing' ? (message_sender || @user) : @conversation.contact
end
def location_params(attachment)
lat = attachment['payload']['coordinates']['lat']
long = attachment['payload']['coordinates']['long']
{
external_url: attachment['url'],
coordinates_lat: lat,
coordinates_long: long,
fallback_title: attachment['title']
}
def external_created_at
@params[:external_created_at].present? ? { external_created_at: @params[:external_created_at] } : {}
end
def fallback_params(attachment)
{
fallback_title: attachment['title'],
external_url: attachment['url']
}
def automation_rule_id
@automation_rule.present? ? { content_attributes: { automation_rule_id: @automation_rule } } : {}
end
def conversation_params
{
account_id: @inbox.account_id,
inbox_id: @inbox.id,
contact_id: contact.id
}
def campaign_id
@params[:campaign_id].present? ? { additional_attributes: { campaign_id: @params[:campaign_id] } } : {}
end
def template_params
@params[:template_params].present? ? { additional_attributes: { template_params: JSON.parse(@params[:template_params].to_json) } } : {}
end
def message_sender
return if @params[:sender_type] != 'AgentBot'
AgentBot.where(account_id: [nil, @conversation.account.id]).find_by(id: @params[:sender_id])
end
def message_params
{
account_id: conversation.account_id,
inbox_id: conversation.inbox_id,
message_type: @message_type,
content: response.content,
source_id: response.identifier,
sender: contact
}
end
def contact_params
begin
k = Koala::Facebook::API.new(@inbox.channel.page_access_token) if @inbox.facebook?
result = k.get_object(@sender_id) || {}
rescue Exception => e
result = {}
Raven.capture_exception(e)
end
{
name: "#{result['first_name'] || 'John'} #{result['last_name'] || 'Doe'}",
account_id: @inbox.account_id,
remote_avatar_url: result['profile_pic'] || ''
}
account_id: @conversation.account_id,
inbox_id: @conversation.inbox_id,
message_type: message_type,
content: @params[:content],
private: @private,
sender: sender,
content_type: @params[:content_type],
items: @items,
in_reply_to: @in_reply_to,
echo_id: @params[:echo_id]
}.merge(external_created_at).merge(automation_rule_id).merge(campaign_id).merge(template_params)
end
end
@@ -0,0 +1,83 @@
class Messages::Messenger::MessageBuilder
include ::FileTypeHelper
def process_attachment(attachment)
return if attachment['type'].to_sym == :template
attachment_obj = @message.attachments.new(attachment_params(attachment).except(:remote_file_url))
attachment_obj.save!
attach_file(attachment_obj, attachment_params(attachment)[:remote_file_url]) if attachment_params(attachment)[:remote_file_url]
fetch_story_link(attachment_obj) if attachment_obj.file_type == 'story_mention'
update_attachment_file_type(attachment_obj)
end
def attach_file(attachment, file_url)
attachment_file = Down.download(
file_url
)
attachment.file.attach(
io: attachment_file,
filename: attachment_file.original_filename,
content_type: attachment_file.content_type
)
end
def attachment_params(attachment)
file_type = attachment['type'].to_sym
params = { file_type: file_type, account_id: @message.account_id }
if [:image, :file, :audio, :video, :share, :story_mention].include? file_type
params.merge!(file_type_params(attachment))
elsif file_type == :location
params.merge!(location_params(attachment))
elsif file_type == :fallback
params.merge!(fallback_params(attachment))
end
params
end
def file_type_params(attachment)
{
external_url: attachment['payload']['url'],
remote_file_url: attachment['payload']['url']
}
end
def update_attachment_file_type(attachment)
return unless attachment.file_type == 'share' || attachment.file_type == 'story_mention'
attachment.file_type = file_type(attachment.file&.content_type)
attachment.save!
end
def fetch_story_link(attachment)
message = attachment.message
result = get_story_object_from_source_id(message.source_id)
return if result.blank?
story_id = result['story']['mention']['id']
story_sender = result['from']['username']
message.content_attributes[:story_sender] = story_sender
message.content_attributes[:story_id] = story_id
message.content = I18n.t('conversations.messages.instagram_story_content', story_sender: story_sender)
message.save!
end
def get_story_object_from_source_id(source_id)
k = Koala::Facebook::API.new(@inbox.channel.page_access_token) if @inbox.facebook?
k.get_object(source_id, fields: %w[story from]) || {}
rescue Koala::Facebook::AuthenticationError
@inbox.channel.authorization_error!
raise
rescue Koala::Facebook::ClientError => e
# The exception occurs when we are trying fetch the deleted story or blocked story.
@message.update(content: I18n.t('conversations.messages.instagram_deleted_story_content'))
Rails.logger.error e
{}
rescue StandardError => e
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception
{}
end
end
@@ -1,2 +0,0 @@
class Messages::Outgoing::EchoBuilder < ::Messages::MessageBuilder
end
@@ -1,46 +0,0 @@
class Messages::Outgoing::NormalBuilder
include ::FileTypeHelper
attr_reader :message
def initialize(user, conversation, params)
@content = params[:content]
@private = params[:private] || false
@conversation = conversation
@user = user
@fb_id = params[:fb_id]
@content_type = params[:content_type]
@items = params.to_unsafe_h&.dig(:content_attributes, :items)
@attachments = params[:attachments]
end
def perform
@message = @conversation.messages.build(message_params)
if @attachments.present?
@attachments.each do |uploaded_attachment|
attachment = @message.attachments.new(
account_id: @message.account_id,
file_type: file_type(uploaded_attachment&.content_type)
)
attachment.file.attach(uploaded_attachment)
end
end
@message.save
@message
end
private
def message_params
{
account_id: @conversation.account_id,
inbox_id: @conversation.inbox_id,
message_type: :outgoing,
content: @content,
private: @private,
sender: @user,
source_id: @fb_id,
content_type: @content_type,
items: @items
}
end
end
+3
View File
@@ -15,6 +15,9 @@ class NotificationBuilder
def user_subscribed_to_notification?
notification_setting = user.notification_settings.find_by(account_id: account.id)
# added for the case where an assignee might be removed from the account but remains in conversation
return if notification_setting.blank?
return true if notification_setting.public_send("email_#{notification_type}?")
return true if notification_setting.public_send("push_#{notification_type}?")
@@ -4,7 +4,7 @@ class NotificationSubscriptionBuilder
def perform
# if multiple accounts were used to login in same browser
move_subscription_to_user if identifier_subscription && identifier_subscription.user_id != user.id
build_identifier_subscription if identifier_subscription.blank?
identifier_subscription.blank? ? build_identifier_subscription : update_identifier_subscription
identifier_subscription
end
@@ -25,6 +25,10 @@ class NotificationSubscriptionBuilder
end
def build_identifier_subscription
user.notification_subscriptions.create(params.merge(identifier: identifier))
@identifier_subscription = user.notification_subscriptions.create(params.merge(identifier: identifier))
end
def update_identifier_subscription
identifier_subscription.update(params.merge(identifier: identifier))
end
end
+61 -65
View File
@@ -1,9 +1,17 @@
class V2::ReportBuilder
include DateRangeHelper
include ReportHelper
attr_reader :account, :params
DEFAULT_GROUP_BY = 'day'.freeze
AGENT_RESULTS_PER_PAGE = 25
def initialize(account, params)
@account = account
@params = params
timezone_offset = (params[:timezone_offset] || 0).to_f
@timezone = ActiveSupport::TimeZone[timezone_offset]&.name
end
def timeseries
@@ -12,8 +20,14 @@ class V2::ReportBuilder
# For backward compatible with old report
def build
timeseries.each_with_object([]) do |p, arr|
arr << { value: p[1], timestamp: p[0].to_time.to_i }
if %w[avg_first_response_time avg_resolution_time].include?(params[:metric])
timeseries.each_with_object([]) do |p, arr|
arr << { value: p[1], timestamp: p[0].in_time_zone(@timezone).to_i, count: @grouped_values.count[p[0]] }
end
else
timeseries.each_with_object([]) do |p, arr|
arr << { value: p[1], timestamp: p[0].in_time_zone(@timezone).to_i }
end
end
end
@@ -28,84 +42,66 @@ class V2::ReportBuilder
}
end
private
def scope
return account if params[:type].match?('account')
return inbox if params[:type].match?('inbox')
return user if params[:type].match?('agent')
def conversation_metrics
if params[:type].equal?(:account)
conversations
else
agent_metrics.sort_by { |hash| hash[:metric][:open] }.reverse
end
end
private
def inbox
@inbox ||= account.inboxes.where(id: params[:id]).first
@inbox ||= account.inboxes.find(params[:id])
end
def user
@user ||= account.users.where(id: params[:id]).first
@user ||= account.users.find(params[:id])
end
def conversations_count
scope.conversations
.group_by_day(:created_at, range: range, default_value: 0)
.count
def label
@label ||= account.labels.find(params[:id])
end
# unscoped removes all scopes added to a model previously
def incoming_messages_count
scope.messages.unscoped.where(account_id: account.id).incoming
.group_by_day(:created_at, range: range, default_value: 0)
.count
def team
@team ||= account.teams.find(params[:id])
end
def outgoing_messages_count
scope.messages.unscoped.where(account_id: account.id).outgoing
.group_by_day(:created_at, range: range, default_value: 0)
.count
def get_grouped_values(object_scope)
@grouped_values = object_scope.group_by_period(
params[:group_by] || DEFAULT_GROUP_BY,
:created_at,
default_value: 0,
range: range,
permit: %w[day week month year],
time_zone: @timezone
)
end
def resolutions_count
scope.conversations
.resolved
.group_by_day(:created_at, range: range, default_value: 0)
.count
def agent_metrics
account_users = @account.account_users.page(params[:page]).per(AGENT_RESULTS_PER_PAGE)
account_users.each_with_object([]) do |account_user, arr|
@user = account_user.user
arr << {
id: @user.id,
name: @user.name,
email: @user.email,
thumbnail: @user.avatar_url,
availability: account_user.availability_status,
metric: conversations
}
end
end
def avg_first_response_time
scope.events
.where(name: 'first_response')
.group_by_day(:created_at, range: range, default_value: 0)
.average(:value)
end
def avg_resolution_time
scope.events.where(name: 'conversation_resolved')
.group_by_day(:created_at, range: range, default_value: 0)
.average(:value)
end
def range
parse_date_time(params[:since])..parse_date_time(params[:until])
end
# Taking average of average is not too accurate
# https://en.wikipedia.org/wiki/Simpson's_paradox
# TODO: Will optimize this later
def avg_resolution_time_summary
return 0 if avg_resolution_time.values.empty?
(avg_resolution_time.values.sum / avg_resolution_time.values.length)
end
def avg_first_response_time_summary
return 0 if avg_first_response_time.values.empty?
(avg_first_response_time.values.sum / avg_first_response_time.values.length)
end
def parse_date_time(datetime)
return datetime if datetime.is_a?(DateTime)
return datetime.to_datetime if datetime.is_a?(Time) || datetime.is_a?(Date)
DateTime.strptime(datetime, '%s')
def conversations
@open_conversations = scope.conversations.where(account_id: @account.id).open
first_response_count = @account.reporting_events.where(name: 'first_response', conversation_id: @open_conversations.pluck('id')).count
metric = {
open: @open_conversations.count,
unattended: @open_conversations.count - first_response_count
}
metric[:unassigned] = @open_conversations.unassigned.count if params[:type].equal?(:account)
metric
end
end
+10 -1
View File
@@ -1,5 +1,8 @@
class RoomChannel < ApplicationCable::Channel
def subscribed
# TODO: should we only do ensure stream if current account is present?
# for now going ahead with guard clauses in update_subscription and broadcast_presence
ensure_stream
current_user
current_account
@@ -15,6 +18,8 @@ class RoomChannel < ApplicationCable::Channel
private
def broadcast_presence
return if @current_account.blank?
data = { account_id: @current_account.id, users: ::OnlineStatusTracker.get_available_users(@current_account.id) }
data[:contacts] = ::OnlineStatusTracker.get_available_contacts(@current_account.id) if @current_user.is_a? User
ActionCable.server.broadcast(@pubsub_token, { event: 'presence.update', data: data })
@@ -26,18 +31,22 @@ class RoomChannel < ApplicationCable::Channel
end
def update_subscription
return if @current_account.blank?
::OnlineStatusTracker.update_presence(@current_account.id, @current_user.class.name, @current_user.id)
end
def current_user
@current_user ||= if params[:user_id].blank?
Contact.find_by!(pubsub_token: @pubsub_token)
ContactInbox.find_by!(pubsub_token: @pubsub_token).contact
else
User.find_by!(pubsub_token: @pubsub_token, id: params[:user_id])
end
end
def current_account
return if current_user.blank?
@current_account ||= if @current_user.is_a? Contact
@current_user.account
else
@@ -0,0 +1,5 @@
class AndroidAppController < ApplicationController
def assetlinks
render layout: false
end
end
+10
View File
@@ -10,4 +10,14 @@ class Api::BaseController < ApplicationController
def authenticate_by_access_token?
request.headers[:api_access_token].present? || request.headers[:HTTP_API_ACCESS_TOKEN].present?
end
def check_authorization(model = nil)
model ||= controller_name.classify.constantize
authorize(model)
end
def check_admin_authorization?
raise Pundit::NotAuthorizedError unless Current.account_user.administrator?
end
end
@@ -0,0 +1,35 @@
class Api::V1::Accounts::AgentBotsController < Api::V1::Accounts::BaseController
before_action :current_account
before_action :check_authorization
before_action :agent_bot, except: [:index, :create]
def index
@agent_bots = AgentBot.where(account_id: [nil, Current.account.id])
end
def show; end
def create
@agent_bot = Current.account.agent_bots.create!(permitted_params)
end
def update
@agent_bot.update!(permitted_params)
end
def destroy
@agent_bot.destroy!
head :ok
end
private
def agent_bot
@agent_bot = AgentBot.where(account_id: [nil, Current.account.id]).find(params[:id]) if params[:action] == 'show'
@agent_bot ||= Current.account.agent_bots.find(params[:id])
end
def permitted_params
params.permit(:name, :description, :outgoing_url, :bot_type, bot_config: [:csml_content])
end
end
@@ -2,6 +2,7 @@ class Api::V1::Accounts::AgentsController < Api::V1::Accounts::BaseController
before_action :fetch_agent, except: [:create, :index]
before_action :check_authorization
before_action :find_user, only: [:create]
before_action :validate_limit, only: [:create]
before_action :create_user, only: [:create]
before_action :save_account_user, only: [:create]
@@ -9,25 +10,22 @@ class Api::V1::Accounts::AgentsController < Api::V1::Accounts::BaseController
@agents = agents
end
def destroy
@agent.current_account_user.destroy
head :ok
end
def create; end
def update
@agent.update!(agent_params.except(:role))
@agent.current_account_user.update!(role: agent_params[:role]) if agent_params[:role]
render partial: 'api/v1/models/agent.json.jbuilder', locals: { resource: @agent }
@agent.update!(agent_params.slice(:name).compact)
@agent.current_account_user.update!(agent_params.slice(:role, :availability, :auto_offline).compact)
end
def create
render partial: 'api/v1/models/agent.json.jbuilder', locals: { resource: @user }
def destroy
@agent.current_account_user.destroy!
head :ok
end
private
def check_authorization
authorize(User)
super(User)
end
def fetch_agent
@@ -38,6 +36,8 @@ class Api::V1::Accounts::AgentsController < Api::V1::Accounts::BaseController
@user = User.find_by(email: new_agent_params[:email])
end
# TODO: move this to a builder and combine the save account user method into a builder
# ensure the account user association is also created in a single transaction
def create_user
return if @user
@@ -45,25 +45,33 @@ class Api::V1::Accounts::AgentsController < Api::V1::Accounts::BaseController
end
def save_account_user
AccountUser.create!(
AccountUser.create!({
account_id: Current.account.id,
user_id: @user.id,
role: new_agent_params[:role],
inviter_id: current_user.id
)
}.merge({
role: new_agent_params[:role],
availability: new_agent_params[:availability],
auto_offline: new_agent_params[:auto_offline]
}.compact))
end
def agent_params
params.require(:agent).permit(:email, :name, :role)
params.require(:agent).permit(:name, :email, :name, :role, :availability, :auto_offline)
end
def new_agent_params
time = Time.now.to_i
params.require(:agent).permit(:email, :name, :role)
.merge!(password: time, password_confirmation: time, inviter: current_user)
# intial string ensures the password requirements are met
temp_password = "1!aA#{SecureRandom.alphanumeric(12)}"
params.require(:agent).permit(:email, :name, :role, :availability, :auto_offline)
.merge!(password: temp_password, password_confirmation: temp_password, inviter: current_user)
end
def agents
@agents ||= Current.account.users
@agents ||= Current.account.users.order_by_full_name.includes(:account_users, { avatar_attachment: [:blob] })
end
def validate_limit
render_payment_required('Account limit exceeded. Please purchase more licenses') if agents.count >= Current.account.usage_limits[:agents]
end
end
@@ -0,0 +1,56 @@
class Api::V1::Accounts::ArticlesController < Api::V1::Accounts::BaseController
before_action :portal
before_action :check_authorization
before_action :fetch_article, except: [:index, :create]
before_action :set_current_page, only: [:index]
def index
@articles_count = @portal.articles.count
@articles = @portal.articles
@articles = @articles.search(list_params) if list_params.present?
end
def create
@article = @portal.articles.create!(article_params)
@article.associate_root_article(article_params[:associated_article_id])
@article.draft!
render json: { error: @article.errors.messages }, status: :unprocessable_entity and return unless @article.valid?
end
def edit; end
def show; end
def update
@article.update!(article_params)
end
def destroy
@article.destroy!
head :ok
end
private
def fetch_article
@article = @portal.articles.find(params[:id])
end
def portal
@portal ||= Current.account.portals.find_by(slug: params[:portal_id])
end
def article_params
params.require(:article).permit(
:title, :content, :description, :position, :category_id, :author_id, :associated_article_id, :status
)
end
def list_params
params.permit(:locale, :query, :page, :category_slug, :status, :author_id)
end
def set_current_page
@current_page = params[:page] || 1
end
end
@@ -0,0 +1,24 @@
class Api::V1::Accounts::AssignableAgentsController < Api::V1::Accounts::BaseController
before_action :fetch_inboxes
def index
agent_ids = @inboxes.map do |inbox|
authorize inbox, :show?
member_ids = inbox.members.pluck(:user_id)
member_ids
end
agent_ids = agent_ids.inject(:&)
agents = Current.account.users.where(id: agent_ids)
@assignable_agents = (agents + Current.account.administrators).uniq
end
private
def fetch_inboxes
@inboxes = Current.account.inboxes.find(permitted_params[:inbox_ids])
end
def permitted_params
params.permit(inbox_ids: [])
end
end
@@ -0,0 +1,87 @@
class Api::V1::Accounts::AutomationRulesController < Api::V1::Accounts::BaseController
before_action :check_authorization
before_action :fetch_automation_rule, only: [:show, :update, :destroy, :clone]
def index
@automation_rules = Current.account.automation_rules
end
def create
@automation_rule = Current.account.automation_rules.new(automation_rules_permit)
@automation_rule.actions = params[:actions]
@automation_rule.conditions = params[:conditions]
render json: { error: @automation_rule.errors.messages }, status: :unprocessable_entity and return unless @automation_rule.valid?
@automation_rule.save!
process_attachments
@automation_rule
end
def attach_file
file_blob = ActiveStorage::Blob.create_and_upload!(
key: nil,
io: params[:attachment].tempfile,
filename: params[:attachment].original_filename,
content_type: params[:attachment].content_type
)
render json: { blob_key: file_blob.key, blob_id: file_blob.id }
end
def show; end
def update
ActiveRecord::Base.transaction do
automation_rule_update
process_attachments
rescue StandardError => e
Rails.logger.error e
render json: { error: @automation_rule.errors.messages }.to_json, status: :unprocessable_entity
end
end
def destroy
@automation_rule.destroy!
head :ok
end
def clone
automation_rule = Current.account.automation_rules.find_by(id: params[:automation_rule_id])
new_rule = automation_rule.dup
new_rule.save
@automation_rule = new_rule
end
def process_attachments
actions = @automation_rule.actions.filter_map { |k, _v| k if k['action_name'] == 'send_attachment' }
return if actions.blank?
actions.each do |action|
blob_id = action['action_params']
blob = ActiveStorage::Blob.find_by(id: blob_id)
@automation_rule.files.attach(blob)
end
end
private
def automation_rule_update
@automation_rule.update!(automation_rules_permit)
@automation_rule.actions = params[:actions] if params[:actions]
@automation_rule.conditions = params[:conditions] if params[:conditions]
@automation_rule.save!
end
def automation_rules_permit
params.permit(
:name, :description, :event_name, :account_id, :active,
conditions: [:attribute_key, :filter_operator, :query_operator, :custom_attribute_type, { values: [] }],
actions: [:action_name, { action_params: [] }]
)
end
def fetch_automation_rule
@automation_rule = Current.account.automation_rules.find_by(id: params[:id])
end
end
@@ -1,31 +1,6 @@
class Api::V1::Accounts::BaseController < Api::BaseController
include SwitchLocale
include EnsureCurrentAccountHelper
before_action :current_account
private
def current_account
@current_account ||= ensure_current_account
Current.account = @current_account
end
def ensure_current_account
account = Account.find(params[:account_id])
if current_user
account_accessible_for_user?(account)
elsif @resource&.is_a?(AgentBot)
account_accessible_for_bot?(account)
end
switch_locale account
account
end
def account_accessible_for_user?(account)
@current_account_user = account.account_users.find_by(user_id: current_user.id)
Current.account_user = @current_account_user
render_unauthorized('You are not authorized to access this account') unless @current_account_user
end
def account_accessible_for_bot?(account)
render_unauthorized('You are not authorized to access this account') unless @resource.agent_bot_inboxes.find_by(account_id: account.id)
end
around_action :switch_locale_using_account_locale
end
@@ -0,0 +1,26 @@
class Api::V1::Accounts::BulkActionsController < Api::V1::Accounts::BaseController
before_action :type_matches?
def create
if type_matches?
::BulkActionsJob.perform_later(
account: @current_account,
user: current_user,
params: permitted_params
)
head :ok
else
render json: { success: false }, status: :unprocessable_entity
end
end
private
def type_matches?
['Conversation'].include?(params[:type])
end
def permitted_params
params.permit(:type, ids: [], fields: [:status, :assignee_id, :team_id], labels: [add: [], remove: []])
end
end
@@ -12,9 +12,10 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
page_access_token: page_access_token
)
@facebook_inbox = Current.account.inboxes.create!(name: inbox_name, channel: facebook_channel)
set_instagram_id(page_access_token, facebook_channel)
set_avatar(@facebook_inbox, page_id)
rescue StandardError => e
Rails.logger.info e
ChatwootExceptionTracker.new(e).capture_exception
end
end
@@ -22,6 +23,15 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
@page_details = mark_already_existing_facebook_pages(fb_object.get_connections('me', 'accounts'))
end
def set_instagram_id(page_access_token, facebook_channel)
fb_object = Koala::Facebook::API.new(page_access_token)
response = fb_object.get_connections('me', '', { fields: 'instagram_business_account' })
return if response['instagram_business_account'].blank?
instagram_id = response['instagram_business_account']['id']
facebook_channel.update(instagram_id: instagram_id)
end
# get params[:inbox_id], current_account. params[:omniauth_token]
def reauthorize_page
if @inbox&.facebook?
@@ -30,7 +40,7 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
if (page_detail = (page_details || []).detect { |page| fb_page_id == page['id'] })
update_fb_page(fb_page_id, page_detail['access_token'])
return head :ok
render and return
end
end
@@ -44,9 +54,14 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
end
def update_fb_page(fb_page_id, access_token)
get_fb_page(fb_page_id)&.update!(
user_access_token: @user_access_token, page_access_token: access_token
)
fb_page = get_fb_page(fb_page_id)
ActiveRecord::Base.transaction do
fb_page&.update!(user_access_token: @user_access_token, page_access_token: access_token)
set_instagram_id(access_token, fb_page)
fb_page&.reauthorized!
rescue StandardError => e
ChatwootExceptionTracker.new(e).capture_exception
end
end
def get_fb_page(fb_page_id)
@@ -59,47 +74,23 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
end
def long_lived_token(omniauth_token)
koala = Koala::Facebook::OAuth.new(ENV['FB_APP_ID'], ENV['FB_APP_SECRET'])
koala = Koala::Facebook::OAuth.new(GlobalConfigService.load('FB_APP_ID', ''), GlobalConfigService.load('FB_APP_SECRET', ''))
koala.exchange_access_token_info(omniauth_token)['access_token']
rescue StandardError => e
Rails.logger.info e
Rails.logger.error e
end
def mark_already_existing_facebook_pages(data)
return [] if data.empty?
data.inject([]) do |result, page_detail|
page_detail[:exists] = Current.account.facebook_pages.exists?(page_id: page_detail['id']) ? true : false
page_detail[:exists] = Current.account.facebook_pages.exists?(page_id: page_detail['id'])
result << page_detail
end
end
def set_avatar(facebook_inbox, page_id)
uri = get_avatar_url(page_id)
return unless uri
avatar_resource = LocalResource.new(uri)
facebook_inbox.avatar.attach(io: avatar_resource.file, filename: avatar_resource.tmp_filename, content_type: avatar_resource.encoding)
end
def get_avatar_url(page_id)
begin
url = 'http://graph.facebook.com/' << page_id << '/picture?type=large'
uri = URI.parse(url)
tries = 3
begin
response = uri.open(redirect: false)
rescue OpenURI::HTTPRedirect => e
uri = e.uri # assigned from the "Location" response header
retry if (tries -= 1).positive?
raise
end
pic_url = response.base_uri.to_s
rescue StandardError => e
Rails.logger.debug "Rescued: #{e.inspect}"
pic_url = nil
end
pic_url
avatar_url = "https://graph.facebook.com/#{page_id}/picture?type=large"
Avatar::AvatarFromUrlJob.perform_later(facebook_inbox, avatar_url)
end
end
@@ -0,0 +1,34 @@
class Api::V1::Accounts::CampaignsController < Api::V1::Accounts::BaseController
before_action :campaign, except: [:index, :create]
before_action :check_authorization
def index
@campaigns = Current.account.campaigns
end
def create
@campaign = Current.account.campaigns.create!(campaign_params)
end
def destroy
@campaign.destroy!
head :ok
end
def show; end
def update
@campaign.update!(campaign_params)
end
private
def campaign
@campaign ||= Current.account.campaigns.find_by(display_id: params[:id])
end
def campaign_params
params.require(:campaign).permit(:title, :description, :message, :enabled, :trigger_only_during_business_hours, :inbox_id, :sender_id,
:scheduled_at, audience: [:type, :id], trigger_rules: {})
end
end
@@ -17,7 +17,7 @@ class Api::V1::Accounts::CannedResponsesController < Api::V1::Accounts::BaseCont
end
def destroy
@canned_response.destroy
@canned_response.destroy!
head :ok
end
@@ -33,7 +33,7 @@ class Api::V1::Accounts::CannedResponsesController < Api::V1::Accounts::BaseCont
def canned_responses
if params[:search]
Current.account.canned_responses.where('short_code ILIKE ?', "#{params[:search]}%")
Current.account.canned_responses.where('short_code ILIKE :search OR content ILIKE :search', search: "%#{params[:search]}%")
else
Current.account.canned_responses
end
@@ -0,0 +1,57 @@
class Api::V1::Accounts::CategoriesController < Api::V1::Accounts::BaseController
before_action :portal
before_action :check_authorization
before_action :fetch_category, except: [:index, :create]
before_action :set_current_page, only: [:index]
def index
@categories = @portal.categories.search(params)
end
def create
@category = @portal.categories.create!(category_params)
@category.related_categories << related_categories_records
render json: { error: @category.errors.messages }, status: :unprocessable_entity and return unless @category.valid?
@category.save!
end
def show; end
def update
@category.update!(category_params)
@category.related_categories = related_categories_records if related_categories_records.any?
render json: { error: @category.errors.messages }, status: :unprocessable_entity and return unless @category.valid?
@category.save!
end
def destroy
@category.destroy!
head :ok
end
private
def fetch_category
@category = @portal.categories.find(params[:id])
end
def portal
@portal ||= Current.account.portals.find_by(slug: params[:portal_id])
end
def related_categories_records
@portal.categories.where(id: params[:category][:related_category_ids])
end
def category_params
params.require(:category).permit(
:name, :description, :position, :slug, :locale, :parent_category_id, :associated_category_id
)
end
def set_current_page
@current_page = params[:page] || 1
end
end
@@ -6,8 +6,6 @@ class Api::V1::Accounts::Channels::TwilioChannelsController < Api::V1::Accounts:
authenticate_twilio
build_inbox
setup_webhooks if @twilio_channel.sms?
rescue Twilio::REST::TwilioError => e
render_could_not_create_error(e.message)
rescue StandardError => e
render_could_not_create_error(e.message)
end
@@ -29,6 +27,8 @@ class Api::V1::Accounts::Channels::TwilioChannelsController < Api::V1::Accounts:
end
def phone_number
return if permitted_params[:phone_number].blank?
medium == 'sms' ? permitted_params[:phone_number] : "whatsapp:#{permitted_params[:phone_number]}"
end
@@ -40,6 +40,7 @@ class Api::V1::Accounts::Channels::TwilioChannelsController < Api::V1::Accounts:
@twilio_channel = Current.account.twilio_sms.create!(
account_sid: permitted_params[:account_sid],
auth_token: permitted_params[:auth_token],
messaging_service_sid: permitted_params[:messaging_service_sid].presence,
phone_number: phone_number,
medium: medium
)
@@ -51,7 +52,7 @@ class Api::V1::Accounts::Channels::TwilioChannelsController < Api::V1::Accounts:
def permitted_params
params.require(:twilio_channel).permit(
:account_id, :phone_number, :account_sid, :auth_token, :name, :medium
:account_id, :messaging_service_sid, :phone_number, :account_sid, :auth_token, :name, :medium
)
end
end
@@ -0,0 +1,9 @@
class Api::V1::Accounts::Contacts::BaseController < Api::V1::Accounts::BaseController
before_action :ensure_contact
private
def ensure_contact
@contact = Current.account.contacts.find(params[:contact_id])
end
end
@@ -0,0 +1,15 @@
class Api::V1::Accounts::Contacts::ContactInboxesController < Api::V1::Accounts::Contacts::BaseController
before_action :ensure_inbox, only: [:create]
def create
source_id = params[:source_id] || SecureRandom.uuid
@contact_inbox = ContactInbox.create!(contact: @contact, inbox: @inbox, source_id: source_id)
end
private
def ensure_inbox
@inbox = Current.account.inboxes.find(params[:inbox_id])
authorize @inbox, :show?
end
end
@@ -1,23 +1,17 @@
class Api::V1::Accounts::Contacts::ConversationsController < Api::V1::Accounts::BaseController
class Api::V1::Accounts::Contacts::ConversationsController < Api::V1::Accounts::Contacts::BaseController
def index
@conversations = Current.account.conversations.includes(
:assignee, :contact, :inbox
).where(inbox_id: inbox_ids, contact_id: permitted_params[:contact_id])
:assignee, :contact, :inbox, :taggings
).where(inbox_id: inbox_ids, contact_id: @contact.id)
end
private
def inbox_ids
if current_user.administrator?
Current.account.inboxes.pluck(:id)
elsif current_user.agent?
current_user.assigned_inboxes.pluck(:id)
if Current.user.administrator? || Current.user.agent?
Current.user.assigned_inboxes.pluck(:id)
else
[]
end
end
def permitted_params
params.permit(:contact_id)
end
end
@@ -0,0 +1,13 @@
class Api::V1::Accounts::Contacts::LabelsController < Api::V1::Accounts::Contacts::BaseController
include LabelConcern
private
def model
@model ||= @contact
end
def permitted_params
params.permit(labels: [])
end
end
@@ -0,0 +1,32 @@
class Api::V1::Accounts::Contacts::NotesController < Api::V1::Accounts::Contacts::BaseController
before_action :note, except: [:index, :create]
def index
@notes = @contact.notes.latest.includes(:user)
end
def create
@note = @contact.notes.create!(note_params)
end
def destroy
@note.destroy!
head :ok
end
def show; end
def update
@note.update(note_params)
end
private
def note
@note ||= @contact.notes.find(params[:id])
end
def note_params
params.require(:note).permit(:content).merge({ contact_id: @contact.id, user_id: Current.user.id })
end
end
@@ -1,40 +1,175 @@
class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
protect_from_forgery with: :null_session
include Sift
sort_on :email, type: :string
sort_on :name, internal_name: :order_on_name, type: :scope, scope_params: [:direction]
sort_on :phone_number, type: :string
sort_on :last_activity_at, internal_name: :order_on_last_activity_at, type: :scope, scope_params: [:direction]
sort_on :company, internal_name: :order_on_company_name, type: :scope, scope_params: [:direction]
sort_on :city, internal_name: :order_on_city, type: :scope, scope_params: [:direction]
sort_on :country, internal_name: :order_on_country_name, type: :scope, scope_params: [:direction]
RESULTS_PER_PAGE = 15
before_action :check_authorization
before_action :fetch_contact, only: [:show, :update]
before_action :set_current_page, only: [:index, :active, :search, :filter]
before_action :fetch_contact, only: [:show, :update, :destroy, :avatar, :contactable_inboxes, :destroy_custom_attributes]
before_action :set_include_contact_inboxes, only: [:index, :search, :filter]
def index
@contacts = Current.account.contacts
@contacts_count = resolved_contacts.count
@contacts = fetch_contacts_with_conversation_count(resolved_contacts)
end
def search
render json: { error: 'Specify search string with parameter q' }, status: :unprocessable_entity if params[:q].blank? && return
contacts = resolved_contacts.where(
'name ILIKE :search OR email ILIKE :search OR phone_number ILIKE :search OR contacts.identifier LIKE :search',
search: "%#{params[:q].strip}%"
)
@contacts_count = contacts.count
@contacts = fetch_contacts_with_conversation_count(contacts)
end
def import
render json: { error: I18n.t('errors.contacts.import.failed') }, status: :unprocessable_entity and return if params[:import_file].blank?
ActiveRecord::Base.transaction do
import = Current.account.data_imports.create!(data_type: 'contacts')
import.import_file.attach(params[:import_file])
end
head :ok
end
# returns online contacts
def active
contacts = Current.account.contacts.where(id: ::OnlineStatusTracker
.get_available_contact_ids(Current.account.id))
@contacts_count = contacts.count
@contacts = contacts.page(@current_page)
end
def show; end
def create
@contact = Current.account.contacts.new(contact_create_params)
def filter
result = ::Contacts::FilterService.new(params.permit!, current_user).perform
contacts = result[:contacts]
@contacts_count = result[:count]
@contacts = fetch_contacts_with_conversation_count(contacts)
end
def contactable_inboxes
@all_contactable_inboxes = Contacts::ContactableInboxesService.new(contact: @contact).get
@contactable_inboxes = @all_contactable_inboxes.select { |contactable_inbox| policy(contactable_inbox[:inbox]).show? }
end
# TODO : refactor this method into dedicated contacts/custom_attributes controller class and routes
def destroy_custom_attributes
@contact.custom_attributes = @contact.custom_attributes.excluding(params[:custom_attributes])
@contact.save!
render json: @contact
end
def create
ActiveRecord::Base.transaction do
@contact = Current.account.contacts.new(permitted_params.except(:avatar_url))
@contact.save!
@contact_inbox = build_contact_inbox
process_avatar
end
end
def update
@contact.update!(contact_params)
@contact.assign_attributes(contact_update_params)
@contact.save!
process_avatar if permitted_params[:avatar].present? || permitted_params[:avatar_url].present?
end
def destroy
if ::OnlineStatusTracker.get_presence(
@contact.account.id, 'Contact', @contact.id
)
return render_error({ message: I18n.t('contacts.online.delete', contact_name: @contact.name.capitalize) },
:unprocessable_entity)
end
@contact.destroy!
head :ok
end
def avatar
@contact.avatar.purge if @contact.avatar.attached?
@contact
end
private
def check_authorization
authorize(Contact)
# TODO: Move this to a finder class
def resolved_contacts
return @resolved_contacts if @resolved_contacts
@resolved_contacts = Current.account.contacts.resolved_contacts
@resolved_contacts = @resolved_contacts.tagged_with(params[:labels], any: true) if params[:labels].present?
@resolved_contacts
end
def contact_params
params.require(:contact).permit(:name, :email, :phone_number)
def set_current_page
@current_page = params[:page] || 1
end
def fetch_contacts_with_conversation_count(contacts)
contacts_with_conversation_count = filtrate(contacts).left_outer_joins(:conversations)
.select('contacts.*, COUNT(conversations.id) as conversations_count')
.group('contacts.id')
.includes([{ avatar_attachment: [:blob] }])
.page(@current_page).per(RESULTS_PER_PAGE)
return contacts_with_conversation_count.includes([{ contact_inboxes: [:inbox] }]) if @include_contact_inboxes
contacts_with_conversation_count
end
def build_contact_inbox
return if params[:inbox_id].blank?
inbox = Current.account.inboxes.find(params[:inbox_id])
source_id = params[:source_id] || SecureRandom.uuid
ContactInbox.create(contact: @contact, inbox: inbox, source_id: source_id)
end
def permitted_params
params.permit(:name, :identifier, :email, :phone_number, :avatar, :avatar_url, additional_attributes: {}, custom_attributes: {})
end
def contact_custom_attributes
return @contact.custom_attributes.merge(permitted_params[:custom_attributes]) if permitted_params[:custom_attributes]
@contact.custom_attributes
end
def contact_update_params
# we want the merged custom attributes not the original one
permitted_params.except(:custom_attributes, :avatar_url).merge({ custom_attributes: contact_custom_attributes })
end
def set_include_contact_inboxes
@include_contact_inboxes = if params[:include_contact_inboxes].present?
params[:include_contact_inboxes] == 'true'
else
true
end
end
def fetch_contact
@contact = Current.account.contacts.find(params[:id])
@contact = Current.account.contacts.includes(contact_inboxes: [:inbox]).find(params[:id])
end
def contact_create_params
params.require(:contact).permit(:name, :email, :phone_number)
def process_avatar
::Avatar::AvatarFromUrlJob.perform_later(@contact, params[:avatar_url]) if params[:avatar_url].present?
end
def render_error(error, error_status)
render json: error, status: error_status
end
end
@@ -1,9 +1,34 @@
class Api::V1::Accounts::Conversations::AssignmentsController < Api::V1::Accounts::Conversations::BaseController
# assign agent to a conversation
# assigns agent/team to a conversation
def create
# if params[:assignee_id] is not a valid id, it will set to nil, hence unassigning the conversation
assignee = Current.account.users.find_by(id: params[:assignee_id])
@conversation.update_assignee(assignee)
render json: assignee
if params.key?(:assignee_id)
set_agent
elsif params.key?(:team_id)
set_team
else
render json: nil
end
end
private
def set_agent
@agent = Current.account.users.find_by(id: params[:assignee_id])
@conversation.update_assignee(@agent)
render_agent
end
def render_agent
if @agent.nil?
render json: nil
else
render partial: 'api/v1/models/agent', formats: [:json], locals: { resource: @agent }
end
end
def set_team
@team = Current.account.teams.find_by(id: params[:team_id])
@conversation.update!(team: @team)
render json: @team
end
end
@@ -1,9 +1,11 @@
class Api::V1::Accounts::Conversations::BaseController < Api::V1::Accounts::BaseController
include EnsureCurrentAccountHelper
before_action :conversation
private
def conversation
@conversation ||= Current.account.conversations.find_by(display_id: params[:conversation_id])
@conversation ||= Current.account.conversations.find_by!(display_id: params[:conversation_id])
authorize @conversation.inbox, :show?
end
end
@@ -0,0 +1,17 @@
class Api::V1::Accounts::Conversations::DirectUploadsController < ActiveStorage::DirectUploadsController
include EnsureCurrentAccountHelper
before_action :current_account
before_action :conversation
def create
return if @conversation.nil? || @current_account.nil?
super
end
private
def conversation
@conversation ||= Current.account.conversations.find_by(display_id: params[:conversation_id])
end
end
@@ -1,11 +1,13 @@
class Api::V1::Accounts::Conversations::LabelsController < Api::V1::Accounts::Conversations::BaseController
def create
@conversation.update_labels(params[:labels])
@labels = @conversation.label_list
include LabelConcern
private
def model
@model ||= @conversation
end
# all labels of the current conversation
def index
@labels = @conversation.label_list
def permitted_params
params.permit(:conversation_id, labels: [])
end
end
@@ -4,14 +4,31 @@ class Api::V1::Accounts::Conversations::MessagesController < Api::V1::Accounts::
end
def create
user = current_user || @resource
mb = Messages::Outgoing::NormalBuilder.new(user, @conversation, params)
user = Current.user || @resource
mb = Messages::MessageBuilder.new(user, @conversation, params)
@message = mb.perform
rescue StandardError => e
render_could_not_create_error(e.message)
end
def destroy
ActiveRecord::Base.transaction do
message.update!(content: I18n.t('conversations.messages.deleted'), content_attributes: { deleted: true })
message.attachments.destroy_all
end
end
private
def message
@message ||= @conversation.messages.find(permitted_params[:id])
end
def message_finder
@message_finder ||= MessageFinder.new(@conversation, params)
end
def permitted_params
params.permit(:id)
end
end
@@ -1,6 +1,8 @@
class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseController
include Events::Types
before_action :conversation, except: [:index]
include DateRangeHelper
before_action :conversation, except: [:index, :meta, :search, :create, :filter]
before_action :contact_inbox, only: [:create]
def index
@@ -14,70 +16,144 @@ class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseContro
@conversations_count = result[:count]
end
def search
result = conversation_finder.perform
@conversations = result[:conversations]
@conversations_count = result[:count]
end
def create
@conversation = ::Conversation.create!(conversation_params)
ActiveRecord::Base.transaction do
@conversation = ::Conversation.create!(conversation_params)
Messages::MessageBuilder.new(Current.user, @conversation, params[:message]).perform if params[:message].present?
end
end
def show; end
def filter
result = ::Conversations::FilterService.new(params.permit!, current_user).perform
@conversations = result[:conversations]
@conversations_count = result[:count]
end
def mute
@conversation.mute!
head :ok
end
def unmute
@conversation.unmute!
head :ok
end
def transcript
render json: { error: 'email param missing' }, status: :unprocessable_entity and return if params[:email].blank?
ConversationReplyMailer.with(account: @conversation.account).conversation_transcript(@conversation, params[:email])&.deliver_later
head :ok
end
def toggle_status
if params[:status]
@conversation.status = params[:status]
@status = @conversation.save
set_conversation_status
@status = @conversation.save!
else
@status = @conversation.toggle_status
end
assign_conversation if @conversation.status == 'open' && Current.user.is_a?(User) && Current.user&.agent?
end
def toggle_typing_status
if params[:typing_status] == 'on'
trigger_typing_event(CONVERSATION_TYPING_ON)
elsif params[:typing_status] == 'off'
trigger_typing_event(CONVERSATION_TYPING_OFF)
case params[:typing_status]
when 'on'
trigger_typing_event(CONVERSATION_TYPING_ON, params[:is_private])
when 'off'
trigger_typing_event(CONVERSATION_TYPING_OFF, params[:is_private])
end
head :ok
end
def update_last_seen
@conversation.agent_last_seen_at = parsed_last_seen_at
# rubocop:disable Rails/SkipsModelValidations
@conversation.update_column(:agent_last_seen_at, DateTime.now.utc)
@conversation.update_column(:assignee_last_seen_at, DateTime.now.utc) if assignee?
# rubocop:enable Rails/SkipsModelValidations
end
def custom_attributes
@conversation.custom_attributes = params.permit(custom_attributes: {})[:custom_attributes]
@conversation.save!
head :ok
end
private
def trigger_typing_event(event)
user = current_user.presence || @resource
Rails.configuration.dispatcher.dispatch(event, Time.zone.now, conversation: @conversation, user: user)
def set_conversation_status
status = params[:status] == 'bot' ? 'pending' : params[:status]
@conversation.status = status
@conversation.snoozed_until = parse_date_time(params[:snoozed_until].to_s) if params[:snoozed_until]
end
def parsed_last_seen_at
DateTime.strptime(params[:agent_last_seen_at].to_s, '%s')
def assign_conversation
@agent = Current.account.users.find(current_user.id)
@conversation.update_assignee(@agent)
end
def trigger_typing_event(event, is_private)
user = current_user.presence || @resource
Rails.configuration.dispatcher.dispatch(event, Time.zone.now, conversation: @conversation, user: user, is_private: is_private)
end
def conversation
@conversation ||= Current.account.conversations.find_by(display_id: params[:id])
@conversation ||= Current.account.conversations.find_by!(display_id: params[:id])
authorize @conversation.inbox, :show?
end
def contact_inbox
@contact_inbox = build_contact_inbox
@contact_inbox ||= ::ContactInbox.find_by!(source_id: params[:source_id])
authorize @contact_inbox.inbox, :show?
end
def build_contact_inbox
return if params[:contact_id].blank? || params[:inbox_id].blank?
inbox = Current.account.inboxes.find(params[:inbox_id])
authorize inbox, :show?
ContactInboxBuilder.new(
contact_id: params[:contact_id],
inbox_id: inbox.id,
source_id: params[:source_id]
).perform
end
def conversation_params
additional_attributes = params[:additional_attributes]&.permit! || {}
custom_attributes = params[:custom_attributes]&.permit! || {}
status = params[:status].present? ? { status: params[:status] } : {}
# TODO: temporary fallback for the old bot status in conversation, we will remove after couple of releases
status = { status: 'pending' } if status[:status] == 'bot'
{
account_id: Current.account.id,
inbox_id: @contact_inbox.inbox_id,
contact_id: @contact_inbox.contact_id,
contact_inbox_id: @contact_inbox.id
}
contact_inbox_id: @contact_inbox.id,
additional_attributes: additional_attributes,
custom_attributes: custom_attributes,
snoozed_until: params[:snoozed_until],
assignee_id: params[:assignee_id],
team_id: params[:team_id]
}.merge(status)
end
def conversation_finder
@conversation_finder ||= ConversationFinder.new(current_user, params)
end
def assignee?
@conversation.assignee_id? && current_user == @conversation.assignee
end
end
@@ -0,0 +1,49 @@
class Api::V1::Accounts::CsatSurveyResponsesController < Api::V1::Accounts::BaseController
include Sift
include DateRangeHelper
RESULTS_PER_PAGE = 25
before_action :check_authorization
before_action :set_csat_survey_responses, only: [:index, :metrics, :download]
before_action :set_current_page, only: [:index]
before_action :set_current_page_surveys, only: [:index]
before_action :set_total_sent_messages_count, only: [:metrics]
sort_on :created_at, type: :datetime
def index; end
def metrics
@total_count = @csat_survey_responses.count
@ratings_count = @csat_survey_responses.group(:rating).count
end
def download
response.headers['Content-Type'] = 'text/csv'
response.headers['Content-Disposition'] = 'attachment; filename=csat_report.csv'
render layout: false, template: 'api/v1/accounts/csat_survey_responses/download.csv.erb', format: 'csv'
end
private
def set_total_sent_messages_count
@csat_messages = Current.account.messages.input_csat
@csat_messages = @csat_messages.where(created_at: range) if range.present?
@total_sent_messages_count = @csat_messages.count
end
def set_csat_survey_responses
@csat_survey_responses = filtrate(
Current.account.csat_survey_responses.includes([:conversation, :assigned_agent, :contact])
).filter_by_created_at(range).filter_by_assigned_agent_id(params[:user_ids])
end
def set_current_page_surveys
@csat_survey_responses = @csat_survey_responses.page(@current_page).per(RESULTS_PER_PAGE)
end
def set_current_page
@current_page = params[:page] || 1
end
end
@@ -0,0 +1,49 @@
class Api::V1::Accounts::CustomAttributeDefinitionsController < Api::V1::Accounts::BaseController
before_action :fetch_custom_attributes_definitions, except: [:create]
before_action :fetch_custom_attribute_definition, only: [:show, :update, :destroy]
DEFAULT_ATTRIBUTE_MODEL = 'conversation_attribute'.freeze
def index; end
def show; end
def create
@custom_attribute_definition = Current.account.custom_attribute_definitions.create!(
permitted_payload
)
end
def update
@custom_attribute_definition.update!(permitted_payload)
end
def destroy
@custom_attribute_definition.destroy!
head :no_content
end
private
def fetch_custom_attributes_definitions
@custom_attribute_definitions = Current.account.custom_attribute_definitions.with_attribute_model(permitted_params[:attribute_model])
end
def fetch_custom_attribute_definition
@custom_attribute_definition = Current.account.custom_attribute_definitions.find(permitted_params[:id])
end
def permitted_payload
params.require(:custom_attribute_definition).permit(
:attribute_display_name,
:attribute_description,
:attribute_display_type,
:attribute_key,
:attribute_model,
attribute_values: []
)
end
def permitted_params
params.permit(:id, :filter_type, :attribute_model)
end
end
@@ -0,0 +1,49 @@
class Api::V1::Accounts::CustomFiltersController < Api::V1::Accounts::BaseController
before_action :fetch_custom_filters, except: [:create]
before_action :fetch_custom_filter, only: [:show, :update, :destroy]
DEFAULT_FILTER_TYPE = 'conversation'.freeze
def index; end
def show; end
def create
@custom_filter = current_user.custom_filters.create!(
permitted_payload.merge(account_id: Current.account.id)
)
end
def update
@custom_filter.update!(permitted_payload)
end
def destroy
@custom_filter.destroy!
head :no_content
end
private
def fetch_custom_filters
@custom_filters = current_user.custom_filters.where(
account_id: Current.account.id,
filter_type: permitted_params[:filter_type] || DEFAULT_FILTER_TYPE
)
end
def fetch_custom_filter
@custom_filter = @custom_filters.find(permitted_params[:id])
end
def permitted_payload
params.require(:custom_filter).permit(
:name,
:filter_type,
query: {}
)
end
def permitted_params
params.permit(:id, :filter_type)
end
end
@@ -0,0 +1,44 @@
class Api::V1::Accounts::DashboardAppsController < Api::V1::Accounts::BaseController
before_action :fetch_dashboard_apps, except: [:create]
before_action :fetch_dashboard_app, only: [:show, :update, :destroy]
def index; end
def show; end
def create
@dashboard_app = Current.account.dashboard_apps.create!(
permitted_payload.merge(user_id: Current.user.id)
)
end
def update
@dashboard_app.update!(permitted_payload)
end
def destroy
@dashboard_app.destroy!
head :no_content
end
private
def fetch_dashboard_apps
@dashboard_apps = Current.account.dashboard_apps
end
def fetch_dashboard_app
@dashboard_app = @dashboard_apps.find(permitted_params[:id])
end
def permitted_payload
params.require(:dashboard_app).permit(
:title,
content: [:url, :type]
)
end
def permitted_params
params.permit(:id)
end
end
@@ -1,55 +0,0 @@
class Api::V1::Accounts::FacebookIndicatorsController < Api::V1::Accounts::BaseController
before_action :set_access_token
around_action :handle_with_exception
def mark_seen
fb_bot.deliver(payload('mark_seen'), access_token: @access_token)
head :ok
end
def typing_on
fb_bot.deliver(payload('typing_on'), access_token: @access_token)
head :ok
end
def typing_off
fb_bot.deliver(payload('typing_off'), access_token: @access_token)
head :ok
end
private
def fb_bot
::Facebook::Messenger::Bot
end
def handle_with_exception
yield
rescue Facebook::Messenger::Error => e
Rails.logger.debug "Rescued: #{e.inspect}"
true
end
def payload(action)
{
recipient: { id: contact.source_id },
sender_action: action
}
end
def inbox
@inbox ||= Current.account.inboxes.find(permitted_params[:inbox_id])
end
def set_access_token
@access_token = inbox.channel.page_access_token
end
def contact
@contact ||= inbox.contact_inboxes.find_by!(contact_id: permitted_params[:contact_id])
end
def permitted_params
params.permit(:inbox_id, :contact_id)
end
end
@@ -1,30 +1,49 @@
class Api::V1::Accounts::InboxMembersController < Api::V1::Accounts::BaseController
before_action :fetch_inbox, only: [:create, :show]
before_action :current_agents_ids, only: [:create]
before_action :fetch_inbox
before_action :current_agents_ids, only: [:create, :update]
def create
# update also done via same action
update_agents_list
head :ok
rescue StandardError => e
Rails.logger.debug "Rescued: #{e.inspect}"
render_could_not_create_error('Could not add agents to inbox')
authorize @inbox, :create?
ActiveRecord::Base.transaction do
agents_to_be_added_ids.map { |user_id| @inbox.add_member(user_id) }
end
fetch_updated_agents
end
def show
@agents = Current.account.users.where(id: @inbox.members.pluck(:user_id))
authorize @inbox, :show?
fetch_updated_agents
end
def update
authorize @inbox, :update?
update_agents_list
fetch_updated_agents
end
def destroy
authorize @inbox, :destroy?
ActiveRecord::Base.transaction do
params[:user_ids].map { |user_id| @inbox.remove_member(user_id) }
end
head :ok
end
private
def fetch_updated_agents
@agents = Current.account.users.where(id: @inbox.members.select(:user_id))
end
def update_agents_list
# get all the user_ids which the inbox currently has as members.
# get the list of user_ids from params
# the missing ones are the agents which are to be deleted from the inbox
# the new ones are the agents which are to be added to the inbox
agents_to_be_added_ids.each { |user_id| @inbox.add_member(user_id) }
agents_to_be_removed_ids.each { |user_id| @inbox.remove_member(user_id) }
ActiveRecord::Base.transaction do
agents_to_be_added_ids.each { |user_id| @inbox.add_member(user_id) }
agents_to_be_removed_ids.each { |user_id| @inbox.remove_member(user_id) }
end
end
def agents_to_be_added_ids
@@ -1,29 +1,73 @@
class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
include Api::V1::InboxesHelper
before_action :fetch_inbox, except: [:index, :create]
before_action :fetch_agent_bot, only: [:set_agent_bot]
before_action :check_authorization
before_action :validate_limit, only: [:create]
# we are already handling the authorization in fetch inbox
before_action :check_authorization, except: [:show]
def index
@inboxes = policy_scope(Current.account.inboxes)
@inboxes = policy_scope(Current.account.inboxes.order_by_name.includes(:channel, { avatar_attachment: [:blob] }))
end
def show; end
# Deprecated: This API will be removed in 2.7.0
def assignable_agents
@assignable_agents = (Current.account.users.where(id: @inbox.members.select(:user_id)) + Current.account.administrators).uniq
end
def campaigns
@campaigns = @inbox.campaigns
end
def avatar
@inbox.avatar.attachment.destroy! if @inbox.avatar.attached?
head :ok
end
def create
ActiveRecord::Base.transaction do
channel = web_widgets.create!(permitted_params[:channel].except(:type)) if permitted_params[:channel][:type] == 'web_widget'
channel = create_channel
@inbox = Current.account.inboxes.build(
name: permitted_params[:name],
greeting_message: permitted_params[:greeting_message],
greeting_enabled: permitted_params[:greeting_enabled],
channel: channel
{
name: inbox_name(channel),
channel: channel
}.merge(
permitted_params.except(:channel)
)
)
@inbox.avatar.attach(permitted_params[:avatar])
@inbox.save!
end
end
def update
@inbox.update(inbox_update_params.except(:channel))
@inbox.channel.update!(inbox_update_params[:channel]) if @inbox.channel.is_a?(Channel::WebWidget) && inbox_update_params[:channel].present?
@inbox.update!(permitted_params.except(:channel))
update_inbox_working_hours
channel_attributes = get_channel_attributes(@inbox.channel_type)
# Inbox update doesn't necessarily need channel attributes
return if permitted_params(channel_attributes)[:channel].blank?
if @inbox.inbox_type == 'Email'
begin
validate_email_channel(channel_attributes)
rescue StandardError => e
render json: { message: e }, status: :unprocessable_entity and return
end
@inbox.channel.reauthorized!
end
@inbox.channel.update!(permitted_params(channel_attributes)[:channel])
update_channel_feature_flags
end
def update_inbox_working_hours
@inbox.update_working_hours(params.permit(working_hours: Inbox::OFFISABLE_ATTRS)[:working_hours]) if params[:working_hours]
end
def agent_bot
@agent_bot = @inbox.agent_bot
end
def set_agent_bot
@@ -38,7 +82,7 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
end
def destroy
@inbox.destroy
@inbox.destroy!
head :ok
end
@@ -46,27 +90,58 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
def fetch_inbox
@inbox = Current.account.inboxes.find(params[:id])
authorize @inbox, :show?
end
def fetch_agent_bot
@agent_bot = AgentBot.find(params[:agent_bot]) if params[:agent_bot]
end
def web_widgets
Current.account.web_widgets
def create_channel
return unless %w[web_widget api email line telegram whatsapp sms].include?(permitted_params[:channel][:type])
account_channels_method.create!(permitted_params(channel_type_from_params::EDITABLE_ATTRS)[:channel].except(:type))
end
def check_authorization
authorize(Inbox)
def update_channel_feature_flags
return unless @inbox.web_widget?
return unless permitted_params(Channel::WebWidget::EDITABLE_ATTRS)[:channel].key? :selected_feature_flags
@inbox.channel.selected_feature_flags = permitted_params(Channel::WebWidget::EDITABLE_ATTRS)[:channel][:selected_feature_flags]
@inbox.channel.save!
end
def permitted_params
params.permit(:id, :avatar, :name, :greeting_message, :greeting_enabled, channel:
[:type, :website_url, :widget_color, :welcome_title, :welcome_tagline])
def inbox_attributes
[:name, :avatar, :greeting_enabled, :greeting_message, :enable_email_collect, :csat_survey_enabled,
:enable_auto_assignment, :working_hours_enabled, :out_of_office_message, :timezone, :allow_messages_after_resolved]
end
def inbox_update_params
params.permit(:enable_auto_assignment, :name, :avatar, :greeting_message, :greeting_enabled,
channel: [:website_url, :widget_color, :welcome_title, :welcome_tagline])
def permitted_params(channel_attributes = [])
params.permit(
*inbox_attributes,
channel: [:type, *channel_attributes]
)
end
def channel_type_from_params
{
'web_widget' => Channel::WebWidget,
'api' => Channel::Api,
'email' => Channel::Email,
'line' => Channel::Line,
'telegram' => Channel::Telegram,
'whatsapp' => Channel::Whatsapp,
'sms' => Channel::Sms
}[permitted_params[:channel][:type]]
end
def get_channel_attributes(channel_type)
if channel_type.constantize.const_defined?(:EDITABLE_ATTRS)
channel_type.constantize::EDITABLE_ATTRS.presence
else
[]
end
end
end
Api::V1::Accounts::InboxesController.prepend_mod_with('Api::V1::Accounts::InboxesController')
@@ -1,4 +1,5 @@
class Api::V1::Accounts::Integrations::AppsController < Api::V1::Accounts::BaseController
before_action :check_admin_authorization?
before_action :fetch_apps, only: [:index]
before_action :fetch_app, only: [:show]
@@ -0,0 +1,31 @@
class Api::V1::Accounts::Integrations::HooksController < Api::V1::Accounts::BaseController
before_action :fetch_hook, only: [:update, :destroy]
before_action :check_authorization
def create
@hook = Current.account.hooks.create!(permitted_params)
end
def update
@hook.update!(permitted_params.slice(:status, :settings))
end
def destroy
@hook.destroy!
head :ok
end
private
def fetch_hook
@hook = Current.account.hooks.find(params[:id])
end
def check_authorization
authorize(:hook)
end
def permitted_params
params.require(:hook).permit(:app_id, :inbox_id, :status, settings: {})
end
end
@@ -1,14 +1,17 @@
class Api::V1::Accounts::Integrations::SlackController < Api::V1::Accounts::BaseController
before_action :check_admin_authorization?
before_action :fetch_hook, only: [:update, :destroy]
def create
builder = Integrations::Slack::HookBuilder.new(
account: current_account,
code: params[:code],
inbox_id: params[:inbox_id]
)
@hook = builder.perform
create_chatwoot_slack_channel
ActiveRecord::Base.transaction do
builder = Integrations::Slack::HookBuilder.new(
account: Current.account,
code: params[:code],
inbox_id: params[:inbox_id]
)
@hook = builder.perform
create_chatwoot_slack_channel
end
end
def update
@@ -17,7 +20,7 @@ class Api::V1::Accounts::Integrations::SlackController < Api::V1::Accounts::Base
end
def destroy
@hook.destroy
@hook.destroy!
head :ok
end
@@ -25,7 +28,7 @@ class Api::V1::Accounts::Integrations::SlackController < Api::V1::Accounts::Base
private
def fetch_hook
@hook = Integrations::Hook.find_by(app_id: 'slack')
@hook = Integrations::Hook.where(account: Current.account).find_by(app_id: 'slack')
end
def create_chatwoot_slack_channel
@@ -18,7 +18,7 @@ class Api::V1::Accounts::LabelsController < Api::V1::Accounts::BaseController
end
def destroy
@label.destroy
@label.destroy!
head :ok
end
@@ -28,10 +28,6 @@ class Api::V1::Accounts::LabelsController < Api::V1::Accounts::BaseController
@label = Current.account.labels.find(params[:id])
end
def check_authorization
authorize(Label)
end
def permitted_params
params.require(:label).permit(:title, :description, :color, :show_on_sidebar)
end
@@ -0,0 +1,57 @@
class Api::V1::Accounts::MacrosController < Api::V1::Accounts::BaseController
before_action :check_authorization
before_action :fetch_macro, only: [:show, :update, :destroy, :execute]
def index
@macros = Macro.with_visibility(current_user, params)
end
def create
@macro = Current.account.macros.new(macros_with_user.merge(created_by_id: current_user.id))
@macro.set_visibility(current_user, permitted_params)
@macro.actions = params[:actions]
render json: { error: @macro.errors.messages }, status: :unprocessable_entity and return unless @macro.valid?
@macro.save!
end
def show; end
def destroy
@macro.destroy!
head :ok
end
def update
ActiveRecord::Base.transaction do
@macro.update!(macros_with_user)
@macro.set_visibility(current_user, permitted_params)
@macro.save!
rescue StandardError => e
Rails.logger.error e
render json: { error: @macro.errors.messages }.to_json, status: :unprocessable_entity
end
end
def execute
::MacrosExecutionJob.perform_later(@macro, conversation_ids: params[:conversation_ids], user: Current.user)
head :ok
end
def permitted_params
params.permit(
:name, :account_id, :visibility,
actions: [:action_name, { action_params: [] }]
)
end
def macros_with_user
permitted_params.merge(updated_by_id: current_user.id)
end
def fetch_macro
@macro = Current.account.macros.find_by(id: params[:id])
end
end

Some files were not shown because too many files have changed in this diff Show More