Compare commits

...
1923 Commits
Author SHA1 Message Date
Shivam Mishra 29415571e9 fix: specs for labels and inboxes 2023-04-06 20:18:51 +05:30
Shivam Mishra 7b2e581cd3 fix: specs failing 2023-04-06 20:04:17 +05:30
37dd898c9a Search bar improvements (#6827)
* chore: implement search improvement

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>

* Update app/javascript/dashboard/routes/dashboard/conversation/search/PopOverSearch.vue

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

* Update app/javascript/dashboard/routes/dashboard/conversation/search/PopOverSearch.vue

---------

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-04-06 18:56:56 +05:30
Sivin VargheseandGitHub be2356724e fix: Time specs (#6841) 2023-04-06 16:33:31 +05:30
Sivin VargheseandGitHub ab6276327a feat: Show year in message timestamp if the message is not from the current year (#6830)
* feat: Shows year in message timestamp if the message is not from the current year

* chore: Naming fix
2023-04-06 15:09:38 +05:30
Sivin VargheseandGitHub ee131011f9 fix: Canned Responses are not sent in the new message editor (#6829) 2023-04-05 12:42:39 +05:30
balawaandGitHub 2ca8726005 feat: Extend the message limit for the Facebook Channels (#6816) 2023-04-04 12:07:13 -07:00
Shivam MishraandGitHub b39e5bb642 feat: Remove isAdmin check on merge contact button (#6825) 2023-04-04 09:58:10 -07:00
Pranav Raj SandGitHub ebd5fbef17 chore: Use feature_flags attribute instead of settings_flags (#6820)
* chore: Use feature_flag instead of settings_flag

* Remove unnecessary changes
2023-04-04 09:56:58 -07:00
Shivam MishraandGitHub b7d0016d99 fix: inconsistent usage of snake_case and camelCase (#6824) 2023-04-04 16:22:45 +05:30
Muhsin KelothandGitHub a0eafc94d7 fix: Pre-chat message is not showing in campaign (#6821)
* Fix pre-chat form header issue

* Show pre-message if pre-chat form enabled
2023-04-04 13:37:51 +05:30
Sivin VargheseandGitHub 110e28d08e chore: Disable import option in agent account (#6822) 2023-04-04 13:37:13 +05:30
a040aee96b feat: allow adding custom attributes to conversations from the SDK (#6782)
* feat: add conversation attributes method to sdk and widget app

* feat: add endpoints to update custom attributes

* refactor: update SDK api

* feat: add api and actions for conversation updates

* fix: error message

* test: custom attributes on conversations controller

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-04-04 08:57:55 +05:30
Tejaswini ChileandGitHub 6a0ca35de4 Feat: detect language of the message content (#6660) 2023-04-04 08:57:27 +05:30
Sivin VargheseandGitHub 268eababa3 feat: Adds an option to edit City/Country (#6792)
* feat: Adds an option to edit City/Country

* chore: Minor fix
2023-04-03 19:51:27 +05:30
Tejaswini ChileandGitHub d2d6d271c3 CW-1399 Phone number import (#6815) 2023-04-03 13:53:59 +05:30
Muhsin KelothandGitHub 363ffdbde3 fix: Disable form if pre-chat disabled on new conversation (#6813) 2023-04-03 12:03:58 +05:30
Tejaswini ChileandGitHub 44f73e044a slack with template message link (#6811) 2023-04-03 11:32:37 +05:30
Pranav Raj SandGitHub ebc144683a chore: Update conversation thread rendering in Slack (#6812) 2023-04-02 22:26:08 -07:00
44e4eee28b chore: Update translations (#6806)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-04-02 13:24:13 +05:30
Shivam MishraandGitHub 2e9eead20c feat: update contacts filter query (#6802)
- Update contacts API query to be faster
2023-04-02 13:23:01 +05:30
Tejaswini ChileandGitHub d1ac33e98c feat: Phone number based automation conditions (#6783) 2023-04-02 10:54:51 +05:30
Tejaswini ChileandGitHub 21da03fe5b Fix: Consider bot message on slack integration (#6793) 2023-03-31 18:56:51 +05:30
bd5ff7a8bf fix: Agent avatar instead of bot avatar in pending message (#6777)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-03-31 18:49:31 +05:30
Sivin VargheseandGitHub fd41529b82 chore: Adds the ability to copy phone number from user details (#6791) 2023-03-30 11:03:51 -07:00
Tejaswini ChileandGitHub 7bd830ebfe fix: Email based automation conditions filter (#6786) 2023-03-30 22:34:18 +05:30
Sojan JoseandGitHub 7930902ec8 chore: Refactor Automation Specs (#6796)
The current way of writing specs for automation in one single file automation_listener isn't effective. Hence we are breaking down the specs for each class into separate spec files.

fixes: CW-1447
2023-03-30 21:02:52 +05:30
Tejaswini ChileandGitHub d8604107aa fix: Add link to conversation in slack message (#6768) 2023-03-30 13:03:19 +05:30
cef44bc557 fix: Check valid params exists in WhatsAapp payload (#6780)
Fixes #6779

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-30 12:10:59 +05:30
Sojan JoseandGitHub 7e3a4d2c20 fix: Adds assignee as a participant during auto-assign (#6789)
- Ensures that the assignee is added as a participant during auto-assign
2023-03-30 11:39:53 +05:30
Sojan JoseandGitHub a4c9a2b2f2 chore: Support telegram edited_message events (#6785)
- Add support for telegram edited_message events: Update the user message back in the Chatwoot dashboard when updated by the contact on telegram
2023-03-29 18:48:16 +05:30
d1b65b6c9e chore: Fixes avatar position on failed messages (#6784)
* feat: show external error in message

* Fixes avatar position on failed messages

---------

Co-authored-by: Clairton Rodrigo Heinzen <clairton.rodrigo@gmail.com>
2023-03-29 18:09:18 +05:30
Clairton Rodrigo HeinzenandGitHub 4ed35cf461 feat: show external error in message as tooltip (#6701) 2023-03-29 17:30:57 +05:30
Jordan BroughandGitHub 803015b7f8 chore: Re-add "public" prefix to "public.gen_random_uuid()" in schema.rb (#6770)
Revert unintended schema change from https://github.com/chatwoot/chatwoot/pull/5338#discussion_r957645071
2023-03-29 16:02:13 +05:30
Jordan BroughandGitHub aa75666ad9 chore: Remove extra audit column (#6769)
- Drop unintentional "audits.integer" column
2023-03-29 12:24:14 +05:30
Pavel KuzminandGitHub 2b7ff48bcd fix: Turn off FOCUS_CUSTOM_ATTRIBUTE event to avoid memory leak (#6772) 2023-03-28 18:29:15 -07:00
6002394fcf feat: Support input_select messages on telegram (#5887)
- Adding interactive button support for telegram for outgoing and incoming messages. 


Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-28 22:50:07 +05:30
Shivam MishraandGitHub bc8e8f3bb5 feat: add index to conversation id and account_id (#6757)
- This PR adds an index to conversations id and account_id. This improves the performance of some reports query
2023-03-28 22:34:04 +05:30
54a809ea54 fix: Case insensitive email match (#6760)
Fixes: https://linear.app/chatwoot/issue/CW-1354/email-id-case-sensitive

Co-authored-by: Sojan <sojan@pepalo.com>
2023-03-28 15:23:41 +05:30
Tejaswini ChileandGitHub fdb067a352 fix: mentions are not rendered properly in slack (#6762) 2023-03-28 13:40:16 +05:30
Nithin David ThomasandGitHub d082aa50a8 fix: Adds support for multiple file uploads in whatsapp inbox (#6763) 2023-03-28 13:10:16 +05:30
Muhsin KelothandGitHub 3535a1a708 chore: Auto capitalize the last name field while sending the canned response/variables (#6767)
* Capitalize last name

* Add more spec

* Fix last name spec issue

* More spec fixes

* Add more spec fixes

* Update user_drop_spec.rb
2023-03-28 13:03:51 +05:30
Shivam MishraandGitHub 4c10845acd fix: [CW-44] don't count private message as first reply (#6707)
* fix: don't count private message as first reply

* fix: update first_human_response_logic

* refactor: separate valid_first_reply method

* test: valid first reply

* feat: add check for automation rule

* test: update step that creates data

* fix: add boundary condition in case first_reply_created_at is not present

* test: fix report builder

* refactor: conditions

* test: remove second message condition
2023-03-27 21:23:37 +05:30
Muhsin KelothandGitHub 5b7bed9640 chore: Auto capitalize the name field while sending the canned response/variables (#6758)
* capitalize name before sending the message

* Fix specs

* Code cleanups
2023-03-27 18:49:48 +05:30
b3850cb4fa fix: Show meaning full error message while creating and email inbox [CW-1312] (#6711)
* chore: Shows error message while creating and email inbox

* chore: Review fixes

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2023-03-27 16:15:11 +05:30
7de89b6f9b chore: Update translations (#6751)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-27 14:45:50 +05:30
Shivam MishraandGitHub 00ee0478eb feat: IndexedDB based caching for labels, inboxes and teams [CW-50] (#6710)
* feat: allow caching of labels in the account scope

* feat: send cache keys in account json response

* feat: kickstart web worker

* feat: setup basic architecture for workers

* feat: install idb

* feat: add datamanger

* fix: typos

* refactor: rename method

* feat: make init db a manual step

* refactor: separate accountIdFromRoute

* feat: cache enabled API client

* feat: enable caching for inboxes and labels

* feat: enable cache for team

* feat: manage exceptions for team

* feat: add team to data manager

* feat: add a generic listener

* refactor: send only cache keys

* refactor: separate validate method

* feat: add listeners

* feat: add event for revalidate

* feat: add cache keys endpoint

* refactor: fetch cache keys instead of full account data

* fix: key pattern

* feat: don't fetch account for cache_keys

* fix: cache key base class

* refactor: cache keys helper

* feat: add helper

* fix: cache-key update logic

* feat: delete indexeddb on logout

* feat: remove worker.js

* refactor: move data-manager

* refactor: name of file

* feat: add test for DataManager

* refactor: add fake idb to jest setup

* test: cache keys helper

* test: cache keys helper

* test: cache_keys in accounts controller

* refactor: remove cache_keys context

* feat: add policy for cache-keys
2023-03-27 12:16:25 +05:30
Pranav Raj SandGitHub 6000028f64 feat: Allow agents/admins to copy the link to a message (#5912) 2023-03-26 22:58:42 -07:00
Pranav Raj SandGitHub 1e8881577a fix: Display native context menu on image, video preview modals (#6756) 2023-03-26 15:16:56 -07:00
Pranav Raj SandGitHub 4b83bcb5ca fix: Move subscription to after initialize (#6752) 2023-03-26 12:19:29 -07:00
Pranav Raj SandGitHub 70e7530cb4 feat: Setup context menu for message (#6750) 2023-03-24 16:20:19 -07:00
Pranav Raj SandGitHub d666afd757 chore: Refactor messages to support right click context menu (#6748) 2023-03-24 13:49:44 -07:00
Muhsin KelothandGitHub a6e7737c56 feat: Show custom attributes in pre-chat form on new conversation (#6735) 2023-03-23 15:22:49 +05:30
Tejaswini ChileandGitHub 856d9067b0 fix: Super admin redirect issue [CW-1370] (#6715) 2023-03-23 14:37:21 +05:30
Tejaswini ChileandGitHub d94f195284 feat: Add link for instagram profile link (#6721) 2023-03-23 13:34:42 +05:30
1370cf3c07 chore: Update translations
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-23 13:30:21 +05:30
Sivin VargheseandGitHub 1dd7cfc25d fix: Design issues after RTL changes (#6718) 2023-03-21 13:25:35 -07:00
Nithin David ThomasandGitHub f3aba84063 fix: Fixes scroll behavior for search page (#6717) 2023-03-21 12:10:08 +05:30
Tejaswini ChileandGitHub 9c040af028 [CW-1348] fix: Update email regex validation for contact_inbox (#6705) 2023-03-21 10:51:12 +05:30
Sivin VargheseandGitHub 4cae5c7d51 chore: The label creation UI input is transform to lowercase (#6712) 2023-03-20 20:35:15 +05:30
Shivam MishraandGitHub e5134c9ef5 [CW-53] feat: allow downloading heatmap report (#6683)
* feat: add control header slot

* feat: add download API call

* feat: add conversation traffic template

* feat: allow downloading heatmap content

* feat: wire up download

* fix: grid layout for mobile

* chore: revert formatting

* revert: en.yml file

* feat: add conversation traffic text

* feat: disable rule for map block

* test: conversation traffic

* fix: timezone offset

* feat: download report in UTC

* feat: add UTC warning

* chore: revert formatting

* feat: add traffic text

* chore: fix whitespace change
2023-03-20 15:46:29 +05:30
Tejaswini ChileandGitHub 4f936aada5 [CW-1342]: Inbox deletion in background job (#6708) 2023-03-20 13:46:07 +05:30
TarangandGitHub 0c9f129c74 Fix issues with Microsoft Provider (#6702) 2023-03-20 12:27:43 +05:30
Nithin David ThomasandGitHub d2aa5f4c69 fix: Reverts popover styling for search page (#6688) 2023-03-20 11:04:56 +05:30
Nithin David ThomasandGitHub e76b63f91d chore: Upgrade prosemirror package to fix link rendering issue (#6685) 2023-03-16 13:42:52 -07:00
Muhsin KelothandGitHub 5c5764ca85 chore: Enable icelandic language(#6682)
ref: #6681
2023-03-16 20:32:55 +05:30
Tejaswini ChileandGitHub cf487c76a0 fix: delete user record if belongs to no account (#6664) 2023-03-15 21:49:49 +05:30
Sojan 6848433a4c Merge branch 'release/2.15.0' into develop 2023-03-15 19:58:28 +05:30
Sojan 565b87fa98 Bump version to 2.15.0 2023-03-15 19:57:59 +05:30
Sojan JoseandGitHub de8c26dce8 chore: Additional indexes and fixes (#6675)
- Fix breakage related to the look-up job in Heroku deploys 
- Add additional db indexes for performance optimisations
2023-03-15 19:52:02 +05:30
7331154f04 chore: Update translations
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-15 15:23:38 +05:30
Sojan JoseandGitHub a99c37ae5e chore: Resolve bundle audit (#6671)
- Update gems to resolve bundle Audit advisories
2023-03-15 14:05:54 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a4bcb7f154 chore(deps): bump @xmldom/xmldom from 0.7.5 to 0.7.9 (#6666)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.7.5 to 0.7.9.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.7.5...0.7.9)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 19:00:09 -07:00
Pranav Raj SandGitHub eb7070d946 feat(poc): Disable widget based on country (#6658) 2023-03-14 09:09:57 -07:00
Sojan JoseandGitHub e8a174f689 chore: Add sidekiq metrics to newrelic (#6659)
* chore: Add sidekiq stats to newrelic

* chore: add gemlock
2023-03-14 20:50:28 +05:30
Tejaswini ChileandGitHub 24f8befdf2 Fix: Add articles order in category show page (#6662) 2023-03-14 20:00:01 +05:30
Sojan JoseandGitHub abe57873db chore: Disable throwing Webhook exceptions to Sentry (#6663)
- There is little value in throwing the third-party webhook-related exceptions to sentry. Let's rather write it to logs instead.
2023-03-14 17:40:40 +05:30
Nithin David ThomasandGitHub cae3ac94cd feat: Search improvements for conversations (#6645)
* feat: Shows search as a popover

* Reverts search from popover to page

* Fixes review comments on usability

* Fixes keyboard navigation issues
2023-03-14 13:09:43 +05:30
Sojan JoseandGitHub da76537011 chore: Search optimisations (#6644)
- Strip search term before searching
- order messages by created_at desc
- order contacts by last_activity_at desc
- order conversations by created_at desc
- Search only resolved contacts
- Optimize resolved contacts query

ref: #6583
2023-03-13 19:10:31 +05:30
Sojan JoseandGitHub 7cbf1857e4 chore: Set statement timeout for Postgres (#6641)
By default, Rails does not set a timeout on database statements. For example, this will run for a full day, even if your ruby process goes away. But it's configurable in the database.yml with the statement_timeout variable.

Hence we are enforcing a 14s timeout by default. Migration commands inside chatwoot will run with a 10 minutes timeout. For specific cases like migrations, we can override this timeout using the environment variable POSTGRES_STATEMENT_TIMEOUT while starting a new rails console.

Test the timeouts from the rails console using.

```
ActiveRecord::Base.connection.execute("SELECT pg_sleep(15);")
```

ref: https://github.com/ankane/the-ultimate-guide-to-ruby-timeouts#postgresql
ref: https://til.hashrocket.com/posts/b44baf657d-railspg-statement-timeout-
2023-03-13 18:34:18 +05:30
Tejaswini ChileandGitHub 8f4d4798c2 feat: Backend changes for article and categories ordering (#6655) 2023-03-13 17:39:07 +05:30
2e95d3a173 fix: Duplicate conversations and contacts WA and Brazil numbers (#6222)
Resolves issue when receiving a message from Brazil  Whatsapp number.
Fixes: #5840


Co-authored-by: Sojan <sojan@pepalo.com>
2023-03-13 13:20:53 +05:30
Tejaswini ChileandGitHub c9b63ae8eb fix: hook exception for empty hook (#6646) 2023-03-10 16:40:15 +05:30
Tejaswini ChileandGitHub f2684545d9 fix: Handle dialogflow hook without setting and credentials (#6638) 2023-03-09 20:11:08 +05:30
Tejaswini ChileandGitHub fbdc79df76 Fix: skip invalid access token from sentry (#6639) 2023-03-09 16:28:45 +05:30
Tejaswini ChileandGitHub 54b7c98795 fix: Warn Facebook error code 100-2018218 (#6632) 2023-03-09 13:51:10 +05:30
Tejaswini ChileandGitHub 757e1bb1f7 fix: String interpolation (#6635) 2023-03-09 13:50:26 +05:30
Shivam MishraandGitHub 4673cf8cf1 fix: timing in the API (#6633)
* fix: timing in the API

* test: fix params
2023-03-09 00:40:38 +05:30
dd8f8fc845 chore: Disable error tracking for Whatsapp error webhooks (#6627)
https://developers.facebook.com/docs/whatsapp/on-premises/webhooks/components

We are not going to handle the WhatsApp error component webhook event.

https://chatwoot-p3.sentry.io/issues/3957884597/?project=4504723538771968&query=is%3Aunresolved&referrer=issue-stream

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-08 20:50:59 +05:30
c20410f3f4 feat: Ability to update CSAT over Client APIs (#6470)
This PR allows updating CSAT over Client APIs.

ref: #6328

Co-authored-by: Cristian Duta <Cristian.Duta@ti8m.ch>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-08 18:42:49 +05:30
Sojan JoseandGitHub 9bc0f67f54 feat: Add specs for WHATSAPP_CLOUD_BASE_URL env variable (#6630)
ref: #6622
2023-03-08 18:38:54 +05:30
Clairton Rodrigo HeinzenandGitHub eb4da33cdc feat: Ability to customize the base url for Whatsapp Cloud Service (#6622)
Configure a custom endpoint for Whatsapp Cloud Service via `WHATSAPP_CLOUD_BASE_URL`.

refs:  #5142
2023-03-08 18:23:25 +05:30
0fe05dc1b9 feat: add trigram index to tags (#6615)
Fixes: chatwoot/product#796

This migration adds a trigram index to the tags table on the name column. This is used to speed up the search for tags by name, this is a heavy sub-query when generating reports where labels are involved.

Trigram indexes are used to speed up LIKE queries; they are not used for equality queries. This is because the index is not a btree index, it is a GIN index. This means that the index is not ordered and so cannot be used for equality queries.

Read more: https://www.postgresql.org/docs/current/pgtrgm.html

The index is created concurrently: https://thoughtbot.com/blog/how-to-create-postgres-indexes-concurrently-in
---------

Co-authored-by: Sojan <sojan@pepalo.com>
2023-03-08 18:11:07 +05:30
Sojan JoseandGitHub d59fd6b747 chore: Ensure Template messages work even when bot is connected (#6455)
ref: #5592
2023-03-08 18:01:00 +05:30
Sojan JoseandGitHub 5166fd8948 chore: Update gems (#6628)
- Updating gems based on ruby advisory warnings
2023-03-08 17:40:21 +05:30
5214be67c7 chore: Update translations
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-08 14:00:00 +05:30
d6f3643bf0 fix : Meta tags input in help center clears the input value after clicking outside (#6552)
* chore: supports preserving input value after clicking out

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>

* chore: supports tag addition on blur

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>

* feat: use search-change instead of vue-multiselect refs

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>

---------

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-03-07 19:27:10 +05:30
Tejaswini ChileandGitHub 9c9183a352 chore: spec ensuring first_reply_created doesn't trigger automations
Specs to ensure that first_reply_created event doesn't trigger automations

ref: #6618
2023-03-07 17:40:17 +05:30
c88792f4a3 feat: add Conversation traffic heatmap (#6508)
* feat: add heatmap component

* feat: add heatmap component

* feat: add dummy heatmap

* refactor: compact tiles

* feat: allow hour

* feat: wire up heatmap query

* feat: allow arbritrary number of weeks

* feat: update position of the widget

* chore: update heatmap title

* refactor: move traffic heatmap to overview

* chore: add comment for perf

* feat: add reconcile logic for heatmap fetching

Fetching the data for the last 6 days all the time is wasteful
So we fetch only the data for today and reconcile it with the data we already have

* refactor: re-org code for new utils

* feat: add translations

* feat: translate days of the week

* chore: update chatwoot utils

* feat: add markers to heatmap

* refactor: update class names

* refactor: move flatten as a separate method

* test: Heatmap Helpers

* chore: add comments

* refactor: method naming

* refactor: use heatmap-level mixin

* refactor: cleanup css

* chore: remove log

* refactor: reports.js to use object instead of separate params

* refactor: report store to use new API design

* refactor: rename HeatmapHelper -> ReportsDataHelper

* refactor: separate clampDataBetweenTimeline

* feat: add tests

* fix: group by hour

* feat: add scroll for smaller screens

* refactor: add base data to reconcile with

* fix: tests

* fix: overflow only on smaller screens

* feat: translate tooltip

* refactor: simplify reconcile

* chore: add docs

* chore: remoev heatmap from account report

* feat: let Heatmap handle loading state

* chore: Apply suggestions from code review

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

* feat: update css

* refactor: color assignment to range

* feat: add short circuit

* Update app/javascript/dashboard/routes/dashboard/settings/reports/components/Heatmap.vue

---------

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>
2023-03-07 09:01:58 +05:30
Tejaswini ChileandGitHub 2abc57300c fix: Add a check for automation_created message in FIRST_REPLY_CREATED event (#6618) 2023-03-06 17:47:35 +05:30
WojtekandGitHub 9c6eb8b03d chore: Fix the comment in schedule.yml (#6606) 2023-03-03 10:22:25 -08:00
88ed028a06 feat: Revamps search to use new search API's (#6582)
* feat: Revamps search to use new search API's

* Fixes search result spacing

* Fixes message result

* Fixes issue with empty search results

* Remove console errors

* Remove console errors

* Fix console errors, canned responses

* Fixes message rendering on results

* Highlights search term

* Fixes html rendering for emails

* FIxes email rendering issues

* Removes extra spaces and line breaks

---------

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-03-03 20:58:21 +05:30
2a385f377c chore: Use markdown-it instead of marked (#6123)
* chore: Use markdown-it instead of marked

* Adds styling for markdown rendered content

* fixes codeclimate issue

* Fixes blockquote styles for widget in darkmode

* fix: issue block quote color issue in light mode

* fix: issue block quote color issue in light mode

* Fixes blockquote color in dark mode

* Remove usage of dark mode mixin in user bubble

* chore: code clean up

---------

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2023-03-03 13:26:54 +05:30
Tejaswini ChileandGitHub ec04ddc725 Fallback name branch (#6591) 2023-03-03 12:26:59 +05:30
Tejaswini ChileandGitHub 60fee519bd Exception tracker with account (#6603) 2023-03-03 12:14:44 +05:30
Sivin VargheseandGitHub a685e065da fix: Fixes assignee and inbox name spacing issues (#6589) 2023-03-02 22:00:43 +05:30
Tejaswini ChileandGitHub a4fc0eef4b fix: Exception tracking for dialogflow bot service (#6593) 2023-03-02 21:33:07 +05:30
Shivam MishraandGitHub a6405ea339 fix: migration script to run on all reporting events (#6590)
* fix: migration script to run on all reporting events

* fix: don't update user_id if it is already present

* refactor: create a new migration

* feat: update schema

* feat: ignore events with bot handoff

* feat: prefetch conversations with handoff events

* Revert "feat: update schema"

This reverts commit 25ed2856e62655f5f1db14fd0cffad3a69d0b1fb.

* feat: update schema

* refactor: separate method get_conversations_with_bot_handoffs

* refactor: cognitive complexity

* refactor: early return if last_bot_reply is blank

* feat: add async_database_migration queue

* feat: update queue priority
2023-03-02 19:03:31 +05:30
Sojan JoseandGitHub b185059681 chore: Handle APM variables being empty (#6594)
- handle the case where the system fails to start when empty APM environment variables are present
2023-03-02 16:00:16 +05:30
89c391e7c0 fix: Clicking contact name in conversation should open contact details panel (#6580)
* chore: support panel trigger on contact name click

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>

* Update ConversationHeader.vue

---------

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-03-02 13:16:57 +05:30
Pranav Raj SandGitHub 9e8eb293e9 fix: Allow integration apps to be listed by an agent (#6587)
* fix: Allow integration apps to be listed by an agent

* Fix rubocop
2023-03-02 13:02:21 +05:30
Tejaswini ChileandGitHub 61d0a63bf7 Fix: product#804: email sender improvement (#6579) 2023-03-02 10:57:14 +05:30
Tejaswini ChileandGitHub f1827c82fd Update contact create swagger (#6576) 2023-03-01 20:24:21 +05:30
Vishnu NarayananandGitHub d870b0815a feat: Audit log APIs (#6434)
- Adds the appropriate APIs for Audit Logs.

ref: #6015
2023-03-01 20:02:58 +05:30
Nithin David ThomasandGitHub daf17046e9 feat: Creates component to display conversation search results (#6575)
* feat: Creates component to display conversation search results

* Fixes minor bugs
2023-03-01 19:11:10 +05:30
c8cdff8bc4 feat: Creates component to show contact search results (#6571)
* feat: Creates component to show contact search results

* Refactors unused code

* Review fixes

* Update app/javascript/dashboard/modules/search/components/SearchResultContactItem.vue

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

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-03-01 18:26:29 +05:30
34a2486e9c chore: Support plus forwarding in email channel (#6482)
- Support for plus forwarding in the email addresses for email channels

Co-authored-by: Sojan <sojan@pepalo.com>
2023-03-01 15:42:48 +05:30
40e81c63ad chore: New Crowdin updates (#6566)
- Pulling the latest translation updates from Crowdin.

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-03-01 14:35:04 +05:30
Sojan JoseandGitHub c9c3ac4b44 chore: Load only required APMs (#6497)
- Disable requiring the gems for all the APMs 
- Switch to selectively requiring them.
2023-03-01 14:31:51 +05:30
Sojan JoseandGitHub 4c921d3d0e chore: fix flaky tests (#6569)
- fixing flaky test in search service spec
2023-03-01 11:44:16 +05:30
Pranav Raj SandGitHub e5090fcdc7 fix: Show only categories where published articles count > 0 (#6567) 2023-03-01 11:02:54 +05:30
Sivin VargheseandGitHub 0a993978ba bug: Bulk actions Assign agent is not working (#6568) 2023-03-01 10:53:40 +05:30
Sojan JoseandGitHub d4e7eaecce feat: New APIs for search (#6564)
- Adding new API endpoints for search
- Migrations to add appropriate indexes
2023-02-28 22:00:36 +05:30
Sivin VargheseandGitHub 9bd47588fc bug: Fixes i18n is not working on the help center dashboard (#6562) 2023-02-28 16:12:08 +05:30
d5a2756462 feat: Add the option for consent form (#6511)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-02-28 13:57:05 +05:30
Vishnu NarayananandGitHub 42d9b6ffed chore: upload log artifact in nightly gh action (#6513) 2023-02-28 12:18:06 +05:30
Chatwoot BotandGitHub 04f30e3033 chore: Update translations (#6534) 2023-02-27 18:15:34 -08:00
Pranav Raj SandGitHub 69a1c4527f fix: Fix i18n issues with help center (#6559) 2023-02-27 17:45:57 -08:00
Pranav Raj SandGitHub b141fc1289 fix: Fetch categories by locale (#6557) 2023-02-27 09:12:14 -08:00
Tejaswini ChileandGitHub ce807d3251 fix: Condition based backend validation (#6554) 2023-02-27 20:22:07 +05:30
Tejaswini ChileandGitHub b76fda53a2 fix: Email subject automation issue (#6533) 2023-02-27 18:33:11 +05:30
Sivin VargheseandGitHub eb55ff5c9b chore: Adds the ability to automatically initialize the RTL direction (#6531) 2023-02-27 12:03:40 +05:30
Sivin VargheseandGitHub bfb445186d chore: Refactor reports css for RTL (#6537) 2023-02-27 11:50:21 +05:30
7d4e6d0257 chore: Refactor tables in all screen for RTL (#6525)
* chore: Refactor tables in all screen for RTL

* Notification page footer

* Apply suggestions from code review

* chore: Minor ixes

* chore: Adds rtl comment

* chore: Code clean up for contact table

---------

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-02-27 11:36:28 +05:30
06ffaa90fc fix: bots included in time to response metrics (#6409)
* feat: ignore bots in avg_first_response_time

* feat: ignore bots in avg_first_response count

* feat: add bot handoff event

* feat: add handoff event listener and reporting event

* fix: ignore agent bot in first response

* refactor: calculate first_response with last handoff

* refactor: method defn order

* test: new reporting events

* feat: Revert "feat: ignore bots in avg_first_response count"

This reverts commit de1977c219a2e7a9180dd02272244fe3b3f7ce89.

* feat: Revert "feat: ignore bots in avg_first_response_time"

This reverts commit bb9171945d5e3b2f6015f4f96dd1b76b3efb6987.

* fix: business hour calculation for first_reply

* fix: event_start_time for first_response

* feat: add migration to recompute first_responses

* refactor: separate mute helpers for conversation

* refactor: rename migration

* refactor: migration script

* fix: migration typo

* fix: typo in query

* feat: update schema.rb

* Revert "feat: update schema.rb"

This reverts commit 353ef355f2d956dd219907bb66982dc90ca5d896.

* feat: update schema

* refactor: update events as a batch job

* fix: ignore the event if value is negative

* feat: don't create a new hand-off if it's already present

* refactor: break the action into smaller chunks

* refactor: update reporting listener spec

Handle the case to ensure extra bot handoffs are not created for a give conversation

* fix: import error

---------

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2023-02-25 09:48:48 +05:30
Sivin VargheseandGitHub 92d0398744 chore: Refactor conversation info panel for RTL (#6526)
* chore: Refactor conversation info panel for RTL

* chore: Adds comments

* chore: Settings header icon fix

* chore: Toggle layout switch

* chore: Border fix in chat list
2023-02-24 19:20:17 +05:30
Shivam MishraandGitHub 76650c86cd chore: add --force-exclusion option (#6535)
The pre-commit hook would format event those files excluded in the config. This is because the files were passed as args instead of the linter running on the entire project. When this happens, the exclude is not respect.

The --force-exclusion flag instructs our machine overlords to force exlucde files specified in the configuration Exclude even if they are explicitly passed as arguments.
2023-02-24 17:15:11 +05:30
Pranav Raj SandGitHub c998c84bc0 fix: Name missing when email is collected via email hook (#6530)
- The name is not updated when the email is updated via the email collect message. This PR fixes that.
2023-02-24 15:24:53 +05:30
Tejaswini ChileandGitHub 26e760a281 Add sender_name in the SMTP reply mails (#6528) 2023-02-24 13:20:56 +05:30
9fcb29484d chore: Refactor sidebar related changes for RTL (#6519)
* Woot tabs

* Refactor sidebar related RTL

* Context menu

* chore: Minor fixes

* chore: Dropdown

* chore: Toggle switch

* chore: sidebar fixes

* fix: spacing issues and minor fixes

* chore: Space slab to small

---------

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2023-02-24 13:01:54 +05:30
Sivin VargheseandGitHub 6d4b894f95 chore: Refactor chat list for RTL (#6524)
* chore: Refactor chat list for RTL

* chore: Modal

* fix: Show more button margin

* chore: Inbox name fix
2023-02-24 12:35:06 +05:30
Pranav Raj SandGitHub e7d0bf8a1b chore: Display CSAT responses in the message itself. (#6529) 2023-02-23 18:11:46 -08:00
60f953cd27 chore: Refactor reports for RTL (#6517)
* Refactor reports

* fix: spacing issues and minor fixes

---------

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2023-02-23 19:50:49 +05:30
Vishnu NarayananandGitHub 71f2b27728 fix: ActiveRecord::RecordNotFound Couldn't find Channel::WebWidget (#6523)
* fix: resucue ActiveRecord::RecordNotFound for webwidget controller

* chore: add rails.log
2023-02-23 19:16:07 +05:30
Sivin VargheseandGitHub 6407745571 chore: Woot tabs for RTL(#6518) 2023-02-23 18:18:28 +05:30
Sivin VargheseandGitHub 409466bbd5 chore: RTL configuration (#6521)
* chore: RTL configuration

* Adds scss file
2023-02-23 17:50:44 +05:30
87aabfbb9a chore: Refactor integrations pages for RTL (#6516)
* Refactor integrations

* Adjust spacing for integration item

---------

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2023-02-23 17:29:28 +05:30
Sivin VargheseandGitHub fdf8b3f369 chore: Refactor utility files for RTL (#6515)
* Chore: Refactor for RTL

* Chore: mInor fixes

* minor fixes
2023-02-23 16:59:48 +05:30
Nithin David ThomasandGitHub 2674130714 chore: Refactors chatlist header css to work with RTL (#6520)
authored by 1277421+nithindavid@users.noreply.github.com
2023-02-23 16:45:56 +05:30
Clairton Rodrigo HeinzenandGitHub 8935933266 fix: First attachment with caption for whatsapp channel (#6486) 2023-02-22 18:20:10 +05:30
cd6a836bf6 fix: Resolves icelandic locale not shown properly on UI (#6505)
Closes #6484

Co-authored-by: raph941 <45232708+raph941@users.noreply.github.com>
2023-02-22 15:40:48 +05:30
b905d4854a fix: Access token should be hidden/masked by default in Agent Dashboard (#6492)
Supports masking/unmasking sensitive data such as API Tokens in the agent dashboard.

Fixes: #6322

Co-authored-by: raph941 <45232708+raph941@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-02-21 19:19:15 +05:30
aff97bff26 feat: Supports masking tokens in super admin (#6491)
Supports masking/unmasking sensitive data such as API Tokens in the super admin dashboard.
ref: #6322

Co-authored-by: raph941 <45232708+raph941@users.noreply.github.com>
Co-authored-by: phunguyenmurcul <51897872+phunguyenmurcul@users.noreply.github.com>
2023-02-21 17:50:55 +05:30
Afonso LageandGitHub e3d9a0441d chore: Bumped Ruby version on codespace image to 3.1.3 (#6490)
- Bumped Ruby version on codespace docker image to match the new Ruby version 3.1.3, which is required since from 2.14.
2023-02-21 17:05:46 +05:30
930863b25b fix: sentry CHATWOOT-37A ActiveRecord::RecordNotUnique (#6496)
* fix: sentry CHATWOOT-37A #6457

* chore: add spec
---------

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-02-21 09:34:51 +05:30
62de25960c feat: Integrate LogRocket (#6494)
* feat: install logrocket

* feat: allow log rocket

* feat: enable vuex log-rocket

* feat: integrate vuex with log rocket

* feat: add log rocket identify

* fix: identify if log rocket is initialized

---------

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2023-02-21 08:42:45 +05:30
Vishnu NarayananandGitHub 26f164d6a0 fix: foss_spec github action (#6495)
* fix: foss_spec gh action
* chore: upload log artifact in foss_spec gh action
* chore: ping foss_spec gh action runner os version to ubuntu-20.04
* fix: set nodeversion to 16
2023-02-20 23:37:41 +05:30
Nithin David ThomasandGitHub c9242fac9e fix: Warning in conversations page from participants (#6479) 2023-02-17 08:44:16 -08:00
Pranav Raj SandGitHub b479b7c6d7 chore: Enable push permissions if available (#6474) 2023-02-17 08:43:28 -08:00
Nithin David ThomasandGitHub 4d719a8fe3 fix: Add a settings link for portals in sidebar (#6475) 2023-02-17 17:48:16 +05:30
Pranav Raj SandGitHub 71d8195845 fix: Add scoped CSS for participants (#6472) 2023-02-16 09:57:11 -08:00
59964a4f41 swagger: fixed invalid specification (#5485)
Currently, the swagger spec doesn't follow the Swagger 2.0 specification. So, I facing 4 errors when trying generate the Golang client for chatwoot.
Due to the spec, the binary field should use format: binary beside type: string

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-02-16 17:47:26 +05:30
Sojan 8c49a2efc5 Merge branch 'release/2.14.0' into develop 2023-02-16 13:42:32 +05:30
Sojan 0bbc8ebd6f Bump version to 2.14.0 2023-02-16 13:41:10 +05:30
ca1adb9960 feat: conversation participants (#4145)
Fixes #241
Fixes: chatwoot/product#648

Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-02-16 13:35:06 +05:30
7be2ef3292 feat: Google OAuth for login & signup (#6346)
This PR adds Google OAuth for all existing users, allowing users to log in or sign up via their Google account.

---------

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2023-02-16 11:12:02 +05:30
2c8ecbeceb feat: Adds image attachment for help center articles (#6426)
* Added one more endpoint to attach tempfile and get logo

* Added one more endpoint to attach tempfile and get logo

* spec fixes

* Upload file for articles irrespective of the association

* Upload file for articles irrespective of the association

* Add multiple images with different keys

* feat: Adds image attachment for help center articles

* Adds validation for file upload

* Fixes space above image after adding to doc

* chore: Removed svg from file upload type

* Update app/javascript/dashboard/components/widgets/WootWriter/FullEditor.vue

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>

* Update app/javascript/dashboard/components/widgets/WootWriter/FullEditor.vue

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>

* Removes caption for the image

* Fixes woot prosemirror package version

* Update yarn.lock

* Update yarn.lock

---------

Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-02-15 21:11:32 -08:00
Pranav Raj SandGitHub 80784e3cab feat: Add Google Translate API Integration (#6454) 2023-02-15 20:50:45 -08:00
Chatwoot BotandGitHub c12bdc8350 chore: Update translations (#6449) 2023-02-15 20:42:45 -08:00
Sojan JoseandGitHub 0888596b83 chore: Limit widget endpoint with rack attack (#6465)
ref: https://github.com/chatwoot/chatwoot/issues/1007#issuecomment-1427156094
2023-02-15 20:41:40 -08:00
7044eda281 chore: Add controllers for conversation participants (#6462)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
Co-authored-by: Sojan Jose <sojan@chatwoot.com>
2023-02-15 16:33:31 -08:00
Pranav Raj SandGitHub 949ddf68ba chore: Refactor the notification service for participants (#6461) 2023-02-15 14:14:56 -08:00
d6baa5db85 fix: Send attachments as multiple messages for whatsapp channel (#6428)
* fix: Send attachments as multiple messages for whatsapp channel

* Review fixes

* Fixes bug with whatsapp inbox check condition

---------

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>
2023-02-15 12:53:20 -08:00
97b1b4c6f9 fix: Prevents duplicate action trigger on interactive messages (#6448)
Co-authored-by: raph941 <45232708+raph941@users.noreply.github.com>
Co-authored-by: phunguyenmurcul <51897872+phunguyenmurcul@users.noreply.github.com>
2023-02-14 11:57:22 -08:00
Pranav Raj SandGitHub 98ff185d42 chore: Add formatting for the view count (#6447) 2023-02-13 14:29:14 -08:00
caca99a823 fix : Help Center article view count (#6429)
* fix: resolves issue with non updating article view count

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>

* Update articles_controller.rb

---------

Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-02-13 14:27:17 -08:00
Sojan JoseandGitHub f0fbaacaf7 chore: Switch to csv-safe gem to avoid csv injection (#6444) 2023-02-13 13:38:36 -08:00
Chatwoot BotandGitHub ff9cadc9a0 chore: Update translations from Crowdin (#6283) 2023-02-13 13:34:53 -08:00
29025759d6 feat: Add webhook events for contact created, updated (#6415)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-02-13 13:28:27 -08:00
Shivam MishraandGitHub ba69f4cd35 test: fix time spec breaking circle CI (#6443) 2023-02-13 18:35:09 +05:30
Sojan JoseandGitHub 5cbfcfbfa0 chore: Limit conversation resolution Job (#6433)
We will be adding a limit to the resolution job so that it is performed at a spaced interval. This will ensure there won't be a sudden spike in resource usage

fixes: chatwoot/product#707
2023-02-13 14:00:52 +05:30
Shivam MishraandGitHub a06a5a574a fix: use innerText instead of innerHTML (#6431)
* refactor: use inner text instead of inner html

* refactor: use innerText instead of innerHTML
2023-02-10 17:20:15 +05:30
Pranav Raj SandGitHub 8db40f2d82 chore: Add chatwoot:on-message event (#6425) 2023-02-09 12:48:22 -08:00
53d5d2af3c chore: Remove pagination from macros listing api (#6419)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-02-09 16:56:37 +05:30
e18f4aeee9 fix: Text color bug on attachment bubble in widget (#6399)
* fix: Text color bug on attachment bubble

* chore: Fix file bubble text color issue

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2023-02-09 16:50:11 +05:30
Tejaswini ChileandGitHub c5b245977a Added one more endpoint to attach tempfile and get logo (#6407) 2023-02-09 14:05:45 +05:30
0a7a5abec1 feat: Adds the ability to change WhatsApp API key (#6348)
This PR adds the ability to change the WhatsApp API key through the settings under the configuration section

Fixes: #6199

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2023-02-08 19:57:59 +05:30
Sojan JoseandGitHub aab6b10b67 [Snyk] Fix for 9 vulnerabilities (#6304) 2023-02-08 18:29:41 +05:30
JanWarlenandGitHub 8a6f647027 fixBug: email notification error, Attachment Message without content (#6408) 2023-02-08 12:51:52 +05:30
Tejaswini ChileandGitHub 7c21cef467 Added event for conversation opened (#6412) 2023-02-08 12:05:22 +05:30
73d14f204e feat: Add the ability to receive contact(vCard) on a WhatsApp inbox (#6330)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-02-07 19:36:38 -08:00
Pranav Raj SandGitHub bc96e5ed22 fix: Add defaults for the cc, bcc emails (#6405) 2023-02-06 18:12:45 -08:00
f8aa544aae fix: order for canned response (#6400)
* feat: order canned response

Order canned responses by short_code match first and then with content

* Added specs

---------

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-02-06 12:53:48 -08:00
Pranav Raj SandGitHub d672aa357b chore: Add subject to the slack message (#6404) 2023-02-06 12:42:06 -08:00
Pranav Raj SandGitHub 527bf593b1 fix: data.attachments is undefined for emails without body (#6403) 2023-02-06 11:45:15 -08:00
Muhsin KelothandGitHub 5902c7a5e1 chore: Update user account availability status (#6375) 2023-02-06 11:07:31 -08:00
Sojan JoseandGitHub 6b839a0442 feat: Ability for super admin to impersonate a user (#6382) 2023-02-06 11:00:08 -08:00
brunosfgandGitHub 0a2d3130e0 Wrong Translation (#6384)
The "open action" translation would be "Abrir" (verb) instead of "Abertas" (which is the adjective).
2023-02-06 13:20:59 +05:30
8ac1cab27e feat: Show contact created date in contact panel (#6364)
* feat: Show contact created date in contact panel

* Add created at in Contacts table

* Moves created at info as tooltip

---------

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2023-02-04 10:40:23 +05:30
Sojan JoseandGitHub 38aee8d9ea chore: Switch to web-push gem (#6390)
- The previous gem, `webpush` was last updated a while ago. Also, with the recent ruby upgrade, we needed a fix for zaru/webpush#106. Hence switching to the `web-push` gem where the issues are fixed.
2023-02-03 18:55:22 +05:30
Vishnu Narayanan 46eeee7d92 Merge branch 'hotfix/2.13.1' into develop 2023-02-03 18:47:57 +05:30
Vishnu Narayanan 76b0279571 chore: Bump version to v2.13.1 2023-02-03 18:46:25 +05:30
Vishnu Narayanan 76731ae31a chore: fix docker public assets issue #6341 2023-02-03 18:45:35 +05:30
Sojan JoseandGitHub ef02fff71e chore: Update Newrelic agent (#6388)
- update new relic agent to 8.15
2023-02-03 16:47:10 +05:30
Shubham KumarandGitHub 51e0388779 feat: Skip gh thread lock gh action on forks (#6381) 2023-02-03 12:20:49 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
30fcb47477 chore(deps): bump commonmarker from 0.23.6 to 0.23.7 (#6342)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.6 to 0.23.7.
- [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.6...v0.23.7)

---
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>
2023-02-02 13:13:35 -08:00
Sivin VargheseandGitHub 84e46adf1c fix: Cannot delete message with attachments without content (#6378) 2023-02-02 11:03:19 -08:00
Nithin David ThomasandGitHub c9667190f6 fix: Increase font size for canned response list item (#6380) 2023-02-02 10:58:03 -08:00
Tejaswini ChileandGitHub 5cce04da78 Chore: specs for process_emails in message builder (#6379) 2023-02-02 18:36:52 +05:30
Divyansh SinghandGitHub 2030c2ebd6 fix: added cc and bcc email validation to message (#6320) 2023-02-02 17:32:04 +05:30
Tejaswini ChileandGitHub 2ab0b8552a fix: Identity JSON response header (#6326) 2023-02-02 11:01:18 +05:30
Sojan JoseandGitHub 2d245cef91 chore: Enable language icelandic(is) (#6373) 2023-02-01 09:43:29 -08:00
Vishnu NarayananandGitHub 992a367d93 fix: redis health status in superadmin panel (#6363) 2023-01-31 22:57:49 +05:30
Shivam MishraandGitHub e1e836cb59 chore: Run linters on staged files only (#6347)
- This PR speeds up the pre-commit hook to lint only the staged files instead of running it across all files as it does now.
2023-01-31 17:29:34 +05:30
4d92cafd3f feat: Order articles by updated_at (#6324)
* feat: Order articles by updated_at

* Sort before pagination

---------

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-01-31 17:28:14 +05:30
ee3124cf84 fix: Uses woot-button in mention box (#6317)
* fix: Uses woot-button in mention box

* Style changes to fix mention box position

* Fixes review comments

* Fixes review comments

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-01-31 16:25:24 +05:30
Vishnu NarayananandGitHub b1af814eab feat: add chatwoot instance status in superadmin (#6045)
* feat: add chatwoot instance status in superadmin

* feat: add redis metrics to instance health page

* chore: fix rubocop

* chore: rescue redis no connection

* chore: add rspec

* chore: refactor

* feat: add instance health to /api

* chore: rescue postgres

* chore: fix spec
2023-01-30 18:37:51 +05:30
Nithin David ThomasandGitHub 747e6cacb9 fix: Fixes enter key sending text while mentions menu is active (#6359) 2023-01-30 16:59:22 +05:30
Muhsin KelothandGitHub 024af909e3 feat: Add support of variables in macros and automation (#6358) 2023-01-30 13:17:33 +05:30
Tejaswini ChileandGitHub 6013cc9bea fix: validate instagram story only while saving the message (#6340) 2023-01-30 13:03:59 +05:30
Pranav Raj SandGitHub 6bd4e8853b fix: Update styles for canned responses modal (#6350) 2023-01-25 19:11:54 -08:00
Pranav Raj SandGitHub 5d331f0bb2 fix: Add missing timestamp in the real-time event (#6349)
* fix: Add missing timestamp in the real-time event

* Fix broken specs
2023-01-25 15:21:41 -08:00
b1ec67d110 chore: upgrade ruby to 3.1.3 (#5555)
* chore: update to ruby 3.1.3

* chore: ping docker version to alpine3.16 for nodev16.x

Starting with Node 17, nodejs switched to OpenSSL3. The docker builds
are installing node18.xx with alpine-3.1.3.

From Node.js 17's announcement post:

    If you hit an ERR_OSSL_EVP_UNSUPPORTED error in your application
with Node.js 17, it’s likely that your application or a module you’re
using is attempting to use an algorithm or key size which is no longer
allowed by default with OpenSSL 3.0. A new command-line option,
--openssl-legacy-provider, has been added to revert to the legacy
provider as a temporary workaround for these tightened restrictions.

Looks like a webpack issue. This is fixed in webpacl 5+ and we are on
webpack4 at the moment.
Solutions

    Upgrade webpack.
    Pin nodejs version to be 16.x.x
    Use  --openssl-legacy-provider as a workaround.

Pin docker version to alpine3.16 branch to have node16.x by default

ref:
https://github.com/chatwoot/chatwoot/pull/5555#issuecomment-1379778532

* chore: update webmock

* chore: fix ruby gem path in dockerfile

* chore: switch to node16 in circleci

* chore: update ruby version in linux installer script

* chore: update ruby version in linux installer script

* chore: fix circleci

* chore: fix circleci

* feat: upgrade node version to 16.x in linux installer

* chore: update systemd files

Co-authored-by: Sojan Jose <sojan@chatwoot.com>
2023-01-24 23:55:07 +05:30
Fayaz AhmedandGitHub b196492f23 fix: Remove whatsapp formats which do we do not support yet (#6331)
- Filters out all the templates where formats are either of these ['DOCUMENT', 'IMAGE', 'VIDEO']
2023-01-24 18:45:39 +05:30
Muhsin KelothandGitHub d9a1154977 feat: Support variables in canned response (#6077)
- Added the option to insert variables in canned responses.
- Populate variables on selecting a canned response.
- Show a warning if there are any undefined variables in the message before sending a message.
2023-01-24 13:06:50 +05:30
cab409f3ef chore: Fixes grammatical errors with content on inbox page (#6308)
* Fixes #6307

- Typo fixed.
- Period added.

* Update app/javascript/dashboard/i18n/locale/en/inboxMgmt.json

Co-authored-by: Hricha Shandily <103104754+Hricha-Shandily@users.noreply.github.com>

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Hricha Shandily <103104754+Hricha-Shandily@users.noreply.github.com>
2023-01-24 11:46:26 +05:30
Sivin VargheseandGitHub af5c71e060 chore: Adds the ability to see the existing filter when we apply a new filter (#6310)
* feat: Adds existing filter to advance filter modal when we apply a filter
2023-01-24 09:10:17 +05:30
Sivin VargheseandGitHub 9782f71bdf feat: Shows the last activity, created at timestamp in the same row (#6267) 2023-01-23 21:50:16 +05:30
487d90207b fix: Update node version in setup_20.04.sh (#5986)
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2023-01-23 16:34:45 +05:30
Tejaswini ChileandGitHub 551dd81d21 chore: change the execution flow for deleting the invalid instagram story (#6313)
* fix: change the execution flow for deleting the invalid instagram story

* fix: bundle audit update fix
2023-01-23 16:23:35 +05:30
Fayaz AhmedandGitHub 4deff9ce77 Break words in phones - iPhones etc (#6287) 2023-01-23 11:36:11 +05:30
Pranav Raj SandGitHub 3b1036e3d6 chore: Add an event for conversation filter (#6306) 2023-01-19 14:07:02 -08:00
Sivin VargheseandGitHub a745068473 chore: Adds a settings button to the notification settings from the notification popup (#6233) 2023-01-19 18:53:42 +05:30
Shivam MishraandGitHub 845311a539 chore: add stale PR bot (#6289)
The PR only adds the stale label and puts a comment, does not close them (yet)
2023-01-19 18:53:21 +05:30
Sojan JoseandGitHub e2ccac78d2 fix: Error when unsupported Whatsapp message status (#6295)
fixes error when unsupported WhatsApp message status
2023-01-19 18:52:38 +05:30
Shivam MishraandGitHub 1193cf1847 feat: ignore errors from extensions (#6297)
This PR ignores errors from chrome and safari extensions, and any local scripts by developers
2023-01-19 18:49:57 +05:30
fgrepandGitHub a86c2705e9 Fix: more events tracking for SaaS (#6234) (#6298) 2023-01-19 17:19:27 +05:30
Fayaz AhmedandGitHub 905fca7869 fix: Whatsapp template picker bug
- Enforce lowercasing the template status value before checking the value
2023-01-19 16:40:46 +05:30
Fayaz AhmedandGitHub 6151e42bdf Filter and return only approved templates (#6288) 2023-01-19 13:40:50 +05:30
Tejaswini ChileandGitHub 83ea2a87e2 Microsoft Re-authorization flow (#6268) 2023-01-19 01:06:01 +05:30
Prithvi TharunandGitHub 8d60bd9970 Fixes #3655 (#6264) 2023-01-18 14:45:37 +05:30
Shivam MishraandGitHub 37b9816827 feat: more events tracking for SaaS (#6234) 2023-01-17 21:53:40 -08:00
Pranav Raj SandGitHub 1df1b1f8e4 fix: Update the inbox id if changed (#6272) 2023-01-18 00:09:17 +05:30
Sojan 0b595211e3 Merge branch 'release/2.13.0' into develop 2023-01-17 18:20:54 +05:30
Sojan e054c2a32f Merge branch 'release/2.13.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2023-01-17 18:20:45 +05:30
Sojan dbe27e081e Bump version to 2.13.0 2023-01-17 18:19:12 +05:30
Pranav Raj SandGitHub f6a56edf86 feat: Add the UI flow for Microsoft Oauth (#6243) 2023-01-17 17:48:14 +05:30
Jordan BroughandGitHub 66cb0ee865 chore: Refactor code in ApplicationMailbox (#5857)
Refactor code in ApplicationMailbox

* short-circuiting as soon as we get a "true" value in some cases
* using ".exists?" instead of instantiating an ActiveRecord object
* using "match?" instead of "match"
2023-01-17 17:30:03 +05:30
Prithvi TharunandGitHub 74b9c79f49 Fixes #3670 (#6265)
Success toast content for copy action made generic that fits all the context and scenarios.
2023-01-17 15:45:59 +05:30
Jan MatuszewskiandGitHub d46f96e45c Fix performance of report builder spec (#6024) 2023-01-17 09:27:50 +05:30
Chatwoot BotandGitHub 032699930c chore: Update translations from Crowdin (#6240) 2023-01-16 16:07:00 -08:00
Pranav Raj SandGitHub 16085fdfbd fix: Add missing translations (#6263) 2023-01-16 15:43:18 -08:00
00cbdaa8ca Feat: Support for Microsoft Oauth in Email Channel (#6227)
- Adds the backend APIs required for Microsoft Email Channels

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2023-01-17 02:39:05 +05:30
Pranav Raj SandGitHub d0972a22b4 chore: Update styles for canned response (#6262) 2023-01-16 12:40:13 -08:00
e707778490 feat: Revamp editor for message and article (#6145)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-01-16 09:08:47 -08:00
0d894e0abc fix: Add animation to live chat trigger button (#6252)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-01-16 09:07:10 -08:00
Sojan JoseandGitHub 72f206025a chore: Fix connection pool (#6005)
We want to allocate as much database connection to the pool to match the sidekiq concurrency configuration.
ref: https://maxencemalbois.medium.com/the-ruby-on-rails-database-connections-pool-4ce1099a9e9f

fixes: #6004
2023-01-16 17:50:23 +05:30
70cb0a8ed9 fix: Use account locale as the default locale on widget (#6248)
* fix: Use account locale as the default locale on widget

* Refactors check for invalid locale

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-01-16 12:14:35 +05:30
d488a42664 feat: Allow disconnecting agent bots (#6245)
* Allow disconnecting the bot

* Code Climate fix

* Show error message if exists

* Codeclimate test - rename file

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-01-13 22:28:45 +05:30
ooooooo_qandGitHub 9e4a5d028c fix: Path traversal at SwaggerController (#6205) 2023-01-12 23:44:21 +05:30
Pranav Raj SandGitHub 9bbadc2388 chore: Create a resuable component for selecting a channel (#6241) 2023-01-11 21:13:51 -08:00
Sojan JoseandGitHub ad782e450e fix: Stop processing broken liquid tags (#6236) 2023-01-11 17:41:02 +05:30
Fayaz AhmedandGitHub 98eb20d600 Use the table-layout: fixed prop (#6232) 2023-01-11 11:37:30 +05:30
0ba5e47308 chore: Update the widescreen layout button icon and background (#6217)
* Update the button icon and background

* Use the woot-button

* Minor css cleanup

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2023-01-11 00:40:48 +05:30
d041f5fc9f fix: Fixes inconsistent spacing in message bubble (#6219)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-01-10 20:51:21 +05:30
Sivin VargheseandGitHub 14382ad881 fix: Not able to create a portal if the custom domain is empty (#6224) 2023-01-10 20:50:35 +05:30
Sojan JoseandGitHub c16624dc5d fix: Duplicate messages in Whatsapp Channel (#6220)
fixes: #5433
2023-01-10 18:57:34 +05:30
Fayaz AhmedandGitHub 60f16e8954 Use woot-editor instead of native textarea (#6216) 2023-01-10 17:50:16 +05:30
078ff615ee feat: Add support for template variables in messages content (#6215)
Fixes: #6078

Co-authored-by: Sojan <sojan@pepalo.com>
2023-01-10 16:00:34 +05:30
Sivin VargheseandGitHub e7a52c3a46 fix: If desktop view is false then the view not getting updated (#6214)
* fix: Desktop view is false then the view not getting updated

* chore: Handle sidebar in small screen

* fix: Scroll issue in touch screens
2023-01-10 15:36:16 +05:30
add33d032c feat: Adds automation view for assigning an agent (#6131)
* feat: Adds automation view for assigning an agent

Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-01-10 11:35:56 +05:30
Sojan JoseandGitHub 28c8023bad chore: Update translations (#6211) 2023-01-09 21:23:11 -08:00
817ec4c50f fix: Fix the default article sidebar state (#6191)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-01-09 20:16:53 -08:00
ffb4bd0109 feat: Add the support for video calls with Dyte in the live-chat widget (#6208)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2023-01-09 11:52:31 -08:00
24cf7af30b feat: Add video call option with Dyte in the dashboard (#6207)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-01-09 11:49:27 -08:00
0a65a233d7 fix: Invalid portal domain validation (#6166)
* fix: Invalid portal domain validation


Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-01-09 13:42:19 +05:30
4172cb4b23 feat: Uses expanded layout as default if the breakpoint is less than or equal to 992px (#6134)
* feat: Uses expanded layout as default if the breakpoint is below 992px

* fixes: ES lint issue

* chore: Review fixes

* chore: Hide toggle sidebar menu in profile settings

* chore: Fix login screen

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

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>

* chore: Review fixes

* chore: Review fixes

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-01-09 13:26:31 +05:30
Pranav Raj SandGitHub cbfbe6dbad feat: Add backend APIs for Dyte integration (#6197)
- The backend changes required for Dyte Integration.
2023-01-09 12:37:18 +05:30
Shivam MishraandGitHub 50894fd591 fix: Add padding for an empty state (#6190) 2023-01-06 13:44:30 -08:00
Sojan JoseandGitHub fbdc921ee5 chore: Fix sentry errors for Instagram channel (#6189)
fixes: #6188
2023-01-06 17:18:31 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Pranav Raj S
3beafe31f8 chore(deps): bump express from 4.17.1 to 4.18.2 (#6030)
Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2)

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

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

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>
2023-01-06 16:01:43 +05:30
74c6db37b3 fix: Fixes broken style in automation page (#6171)
* fix: Fixes broken style in automation page

* Fix the position of drag handle

Co-authored-by: fayazara <fayazara@gmail.com>
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2023-01-06 15:37:28 +05:30
Hricha ShandilyandGitHub 4bbd56f87d chore: Update error message in Custom Attributes (#6187) 2023-01-06 13:58:05 +05:30
Shivam MishraandGitHub b9ae664d47 fix: Update incorrect label for team selection (#6180) 2023-01-05 19:35:11 -08:00
Sojan JoseandGitHub 269ad8f697 Fix: Errors in Heroku deployments (#6182)
Due to 86ca7f4a8d the redis configuration in Heroku deployments was breaking, temporarily reverting the part until we identify a fix.

fixes: #5938
2023-01-05 18:36:21 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9cb75b55f7 chore(deps): bump json5 from 1.0.1 to 1.0.2 (#6168)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-05 14:30:41 +05:30
Pranav Raj SandGitHub fc06ee7726 fix: Update the page size to 15, change default sort to last_activity (#6177) 2023-01-04 15:39:03 -08:00
Sojan JoseandGitHub 88053c60c7 chore: Update translations (#6160) 2023-01-04 11:03:02 -08:00
OMAR.AandGitHub 7b5f1e4876 feat: Support for telegram incoming location message (#6158)
Support for incoming location messages in the telegram channel.

ref: #3398
2023-01-04 16:11:54 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c88ea257d5 chore(deps): bump httparty from 0.20.0 to 0.21.0 (#6164)
Bumps [httparty](https://github.com/jnunemaker/httparty) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/jnunemaker/httparty/releases)
- [Changelog](https://github.com/jnunemaker/httparty/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/httparty/compare/v0.20.0...v0.21.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 14:35:57 +05:30
Pranav Raj SandGitHub dd0d221cfc 2022 -> 2023 2023-01-01 22:12:22 -08:00
Sojan JoseandGitHub ab87f9d6c0 chore: Update translations (#6159) 2023-01-01 21:40:15 -08:00
e3f13dd455 choreButtons must have discernible text (#6132)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-01-01 21:39:38 -08:00
Pranav Raj S 4941c93cb0 Merge branch 'develop'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-12-30 13:58:18 -08:00
Pranav Raj S c11eebb83a Bump version to v2.12.1 2022-12-30 13:54:37 -08:00
Pranav Raj S 69bed3e08d fix: Update unread_messages count in WhatsApp inboxes (#6154)
* fix: Update unread_count from backend instead of computing on the frontend

* Fix spec

* Remove status indicator on private notifications

* CodeClimate fix

* CodeClimate
2022-12-30 13:54:37 -08:00
Sojan JoseandPranav Raj S cf48610f2f chore: Update translations (#6152) 2022-12-30 13:54:37 -08:00
Nithin David ThomasandPranav Raj S b179d1b563 chore: Refactor shortcuts modal to use modal component (#6151)
* chore: Refactor SHortcuts modal to use modal component

* Typography changes
2022-12-30 13:54:37 -08:00
Sivin VargheseandPranav Raj S 34e509b9b7 feat: Adds the ability to play audio alert every 30 sec (#6150)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-30 13:54:37 -08:00
Pranav Raj S 6ffb7fe34e chore: Refactor audio notification helper (#6148) 2022-12-30 13:54:37 -08:00
Pranav Raj S 297e144f33 fix: Update account limit selection logic (#6149) 2022-12-30 13:54:37 -08:00
Sivin VargheseandPranav Raj S 02a687b226 feat: Add new audio alert options (#6141)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-30 13:54:37 -08:00
Sojan JoseandPranav Raj S 10a03cae24 chore: Update translations (#6129) 2022-12-30 13:54:37 -08:00
Sivin VargheseandPranav Raj S e446a12ebb chore: Fixes issue showing the CSAT error message (#6136)
Approved by Muhsin
2022-12-30 13:54:37 -08:00
Nithin David ThomasandPranav Raj S 00eabe07a4 fix: Expand title height of textarea on load (#6103) 2022-12-30 13:54:37 -08:00
Sojan JoseandPranav Raj S 78251f54c9 chore: Update translations (#6113) 2022-12-30 13:54:37 -08:00
d55988a6e0 feat: Add the ability to toggle the secondary sidebar in all display breakpoints (#6118)
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-30 13:54:37 -08:00
Muhsin KelothandPranav Raj S 37aa602c61 chore: Increase the max concurrent number of devices (#6121) 2022-12-30 13:54:37 -08:00
Sivin VargheseandPranav Raj S aba5a1a131 chore: Helpcenter improvements (#6098) 2022-12-30 13:54:37 -08:00
94ca2fd229 feat: Send audio longer than 10 seconds and Add Prop audio-record-format (#6108)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-12-30 13:54:37 -08:00
Pranav Raj S a3e5aad753 fix: Update the logic to show read status for web (#6107) 2022-12-30 13:54:37 -08:00
Sivin VargheseandPranav Raj S 8e13a06833 fix: Use canned response menu from the editor in contact messages (#6109) 2022-12-30 13:54:37 -08:00
Sivin VargheseandPranav Raj S 38f9c3940b chore: Hide inbox name only has one inbox (#6115) 2022-12-30 13:54:37 -08:00
Pranav Raj S e026dc03e0 Merge branch 'release/2.12.1' 2022-12-30 13:49:57 -08:00
Pranav Raj S d911d38391 Bump version to v2.12.1 2022-12-30 13:49:09 -08:00
Pranav Raj SandGitHub 5d1be70e67 fix: Update unread_messages count in WhatsApp inboxes (#6154)
* fix: Update unread_count from backend instead of computing on the frontend

* Fix spec

* Remove status indicator on private notifications

* CodeClimate fix

* CodeClimate
2022-12-30 13:13:33 -08:00
Sojan JoseandGitHub 12b45f5c76 chore: Update translations (#6152) 2022-12-30 09:38:28 -08:00
Nithin David ThomasandGitHub 9f842bcd59 chore: Refactor shortcuts modal to use modal component (#6151)
* chore: Refactor SHortcuts modal to use modal component

* Typography changes
2022-12-30 22:26:16 +05:30
4fba9ef1fb feat: Adds the ability to play audio alert every 30 sec (#6150)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-29 22:16:58 -08:00
Pranav Raj SandGitHub cd3b6ebf28 chore: Refactor audio notification helper (#6148) 2022-12-29 20:01:14 -08:00
Pranav Raj SandGitHub 11f6e6bc61 fix: Update account limit selection logic (#6149) 2022-12-29 19:37:36 -08:00
e5fd866a7c feat: Add new audio alert options (#6141)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-29 10:21:23 -08:00
Sojan JoseandGitHub e5219df2b4 chore: Update translations (#6129) 2022-12-28 13:56:49 -08:00
Sivin VargheseandGitHub 98c289dc3e chore: Fixes issue showing the CSAT error message (#6136)
Approved by Muhsin
2022-12-28 12:49:11 +05:30
Nithin David ThomasandGitHub 3e91765472 fix: Expand title height of textarea on load (#6103) 2022-12-22 14:14:30 -08:00
Sojan JoseandGitHub 1bf23055df chore: Update translations (#6113) 2022-12-22 14:08:08 -08:00
2af337be10 feat: Add the ability to toggle the secondary sidebar in all display breakpoints (#6118)
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-22 14:07:11 -08:00
Muhsin KelothandGitHub dbb6c0a074 chore: Increase the max concurrent number of devices (#6121) 2022-12-22 19:13:54 +05:30
Sivin VargheseandGitHub 8c88344170 chore: Helpcenter improvements (#6098) 2022-12-22 18:51:24 +05:30
6a78254701 feat: Send audio longer than 10 seconds and Add Prop audio-record-format (#6108)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-12-22 13:36:03 +05:30
Pranav Raj SandGitHub 26ada8b342 fix: Update the logic to show read status for web (#6107) 2022-12-21 09:58:56 -08:00
Sivin VargheseandGitHub 3c6bd2c8fd fix: Use canned response menu from the editor in contact messages (#6109) 2022-12-21 16:01:50 +05:30
Sivin VargheseandGitHub 2c2c47d7fd chore: Hide inbox name only has one inbox (#6115) 2022-12-21 13:31:53 +05:30
Sojan 34f7405689 Merge branch 'release/2.12.0' into develop 2022-12-19 22:48:01 +05:30
Sojan 56b1388339 Merge branch 'release/2.12.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-12-19 22:47:50 +05:30
Sojan 3ebfb3a140 Bump version to 2.12.0 2022-12-19 22:44:43 +05:30
Pranav Raj SandGitHub 2dfe38ae4d chore: Cleanup feature flags (#6096)
- Add more feature flags for CRM, auto_resolution, and reports
- Add a SuperAdmin link in the sidebar if the user is a super-admin
- SuperAdmin could view all the features on an account irrespective of whether the feature is enabled.
2022-12-19 22:38:30 +05:30
Sojan JoseandGitHub ca88eb55f4 chore: Update translations from Crowdin 2022-12-19 22:34:49 +05:30
Nithin David ThomasandGitHub d1a26e80f4 fix: Hide show more labels button when there's no overflow (#6097) 2022-12-19 08:54:20 -08:00
022d0b0ea3 chore: Enable prototyping classes for foundation (#5945)
* chore: Enable prototyping classes for foundation

* Marcros css clean up

* Imports utilities separately

* Fix macro position

* Changes global margin

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-12-19 14:11:11 +05:30
Tejaswini ChileandGitHub 5541d9e00b Fix: automation email improvement (#6061) 2022-12-19 13:21:33 +05:30
Pranav Raj SandGitHub 38587b3aa1 fix: Update Slack integration to fix message delivery issues (#6093) 2022-12-17 16:41:11 -08:00
4d2b7c37a0 feat: Display labels in the conversation card (#6088)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2022-12-17 13:11:28 -08:00
aaacf9d4d2 feat: Allow users to disable marking offline automatically (#6079)
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2022-12-16 11:59:27 -08:00
Sivin VargheseandGitHub 82d3398932 fix: Add improvements to the Help Center module (#6081) 2022-12-16 11:41:55 -08:00
9106f6278d fix: Allow editing label and placeholder for standard attributes in pre chat form (#6067)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-12-15 09:36:18 -08:00
f8e6308caf chore: [Snyk] Fix for 7 vulnerabilities (#6075)
* fix: Gemfile to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-LOOFAH-3168317
- https://snyk.io/vuln/SNYK-RUBY-LOOFAH-3168318
- https://snyk.io/vuln/SNYK-RUBY-LOOFAH-3168649
- https://snyk.io/vuln/SNYK-RUBY-RAILSHTMLSANITIZER-3168316
- https://snyk.io/vuln/SNYK-RUBY-RAILSHTMLSANITIZER-3168646
- https://snyk.io/vuln/SNYK-RUBY-RAILSHTMLSANITIZER-3168647
- https://snyk.io/vuln/SNYK-RUBY-RAILSHTMLSANITIZER-3168648

* chore: update gemlock

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2022-12-15 16:40:50 +05:30
Sojan JoseandGitHub 72fcaa739c chore: Update translations from Crowdin 2022-12-15 14:11:15 +05:30
9292653bf9 fix: Update enabled_features logic to fix superadmin edit action (#5959)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-14 18:24:02 -08:00
2a1a38f986 chore: Add feature flags for campaigns and website channel (#5778)
Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-14 16:06:26 -08:00
2972319026 fix: Update colors in widget buttons to fix invalid colors (#6033)
Co-authored-by: nithindavid <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-14 15:21:20 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
26e05de642 chore(deps): bump loofah from 2.18.0 to 2.19.1 (#6072)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.18.0 to 2.19.1.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.18.0...v2.19.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 12:51:36 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8222a47154 chore(deps): bump rails-html-sanitizer from 1.4.3 to 1.4.4 (#6074)
Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/rails/rails-html-sanitizer/releases)
- [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: rails-html-sanitizer
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 12:51:12 -08:00
9d78f0d6c6 feat: Adds number validation for WhatsApp inbox at the creation step (#6043)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-12-12 19:52:37 -08:00
Sivin VargheseandGitHub 86958278cd fix: Unable to save automation "send email to team" (#6052)
* fix: Unable to save automation "send email to team"

* chore: Minor fixes
2022-12-12 20:10:33 +05:30
Pranav Raj SandGitHub 823c836906 feat: Allow wildcard URL in the campaigns (#6056) 2022-12-09 16:43:09 -08:00
Pranav Raj SandGitHub 6200559123 chore: Update analytics events (#6050) 2022-12-08 20:53:13 -08:00
Tejaswini ChileandGitHub 7dc790a7e0 fix: Automatically remove expired story mention (#5300)
When a user mentions the connected Instagram page in a story, the story's content is downloaded in Chatwoot, then if the user deletes the story, the content persists in the platform.

fixes: #5258
2022-12-08 15:55:24 +03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
431e2931c4 chore(deps): bump nokogiri from 1.13.9 to 1.13.10 (#6040)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.9 to 1.13.10.
- [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.9...v1.13.10)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 14:01:52 +03:00
Pranav Raj SandGitHub 52ea201070 fix: Remove duplicate submit action (#6039) 2022-12-07 16:28:45 -08:00
779bcf5e0d feat: Update Signup screen (#6002)
* feat: Update Signup page designs

* feat: Update the signup page with dynamic testimonials

* Remove the images

* chore: Minor UI fixes

* chore: Form aligned to centre

* Update app/javascript/dashboard/routes/auth/components/Signup/Form.vue

* Design improvements

* Update company name key

* Revert "chore: Minor UI fixes"

This reverts commit 1556f4ca835d9aa0d9620fd6a3d52d259f0d7d65.

* Revert "Design improvements

This reverts commit dfb2364cf2f0cc93123698fde92e5f9e00536cc2.

* Remove footer

* Fix spacing

* Update app/views/installation/onboarding/index.html.erb

Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-12-07 15:55:03 -08:00
Pranav Raj SandGitHub 6064aad38f chore: Add business email validation on signup (#6037) 2022-12-07 13:03:51 -08:00
caa45d1d92 feat: Pass logged in agent context to dashboard app (#6034)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-07 12:02:27 -08:00
f1d1bb84fd fix: Filters are not applied unless I'm on the All Conversations screen (#6006)
* fix: Filters are not applied unless I'm on the All Conversations screen

* chore: Review fixes

* chore: Minor sidebar fixes

* chore: Review fixes

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-07 12:00:51 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
01cc3d7c9c chore(deps): bump qs from 6.5.2 to 6.5.3 (#6028)
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 12:49:00 -08:00
Sivin VargheseandGitHub 89cfc5bbf3 fix: Send message with "enter" also do new line (#5961)
* fix: Send message with "enter" also do new line

* chore: Review fixes

* chore: Naming fixes

* chore: Minor fixes

* chore: Fix line break issue when cmd plus enter enabled
2022-12-06 11:25:49 +05:30
OMAR.AandGitHub a82b9991b3 fix: Update the link used for email address change in the confirmation mail (#5937) 2022-12-05 16:17:27 -08:00
Sojan JoseandGitHub 06434bc655 chore: Update translations from Crowdin (#5952) 2022-12-05 16:04:49 -08:00
Jordan BroughandGitHub b9fd1d88ea Escape search term before building regular expression (#5994)
When doing a conversation search, if the search term includes any regular
expression characters and the search returns results, then this function would
throw an exception.

For example, if a conversation includes the text "+15555550111" and you search
for "+15555550111" then you get an exception like:

> Invalid regular expression: /(+15555550111)/: Nothing to repeat

Because the "+" is not escaped.
2022-12-05 16:02:43 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8004f67efe chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#6016)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 16:01:27 -08:00
Sivin VargheseandGitHub 87ef39ad9c feat: Add the ability to search emojis (#5928) 2022-12-05 16:00:42 -08:00
Vishnu NarayananandGitHub c3b6e1a732 fix: update heroku app.json to use premium plans (#5349)
* fix: update heroku app.json to use premium plans

Use premium/paid dynos and addons as Heroku is set to deprecate free dynos/addons.

* fix: set default stack to heroku-20

* chore: update heroku app.json to use new dyno types

web and worker to use basic dynos
redis and postgres to use mini
2022-12-05 21:15:44 +05:30
Muhsin KelothandGitHub c9cae01cb4 fix: Support audio in safari browser (#5943) 2022-12-05 12:30:56 +05:30
Sivin VargheseandGitHub 613fb0b064 fix: Unable to add emoji exactly where the cursor is at (#5865)
* fix: Unable to add emoji exactly where the cursor is at

* chore: Minor fixes

* chore: Review fixes

* chore: Code clean up

* chore: Review fixes

* chore: Minor fixes

* chore: Review fixes
2022-12-05 11:16:00 +05:30
Tejaswini ChileandGitHub 0b5c82ad5f fix: Save hostname for the custom domain in the portal (#5984)
* fix: Save hostname for the custom domain in the portal
2022-12-03 20:37:56 +05:30
c8ec397c79 fix: Update missing features in unattended / mentions view (#6009)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-12-02 15:07:38 -08:00
Tejaswini ChileandGitHub a08099bbcc fix: Custom attr filter on conversations (#5978) 2022-12-02 10:37:32 +05:30
Pranav Raj SandGitHub e35638588a fix: Avoid conversationId getting undefined in unattended view (#6001) 2022-11-30 20:37:58 -08:00
3083f74d45 fix: Update inbox json, removing password (#5981)
- Filter restricted inbox attributes in APIs for agents 

Fixes chatwoot/product#668

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-11-30 13:04:46 +03:00
85b52a1d3f feat: Add a view for unattended conversations (#5890)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-29 08:18:00 -08:00
Nithin David ThomasandGitHub c94ba16565 fix: Updates logic to insert canned response into editor (#5880)
* fix: Updates logic to insert canned response into editor

* Removes commented code

* Parse incoming canned text as markdown
2022-11-29 19:46:55 +05:30
0cad3bed71 fix: Files in Whatsapp arrives with a different Name (#5907)
- Add file name parameter to the WhatsApp attachment payload

fixes: #4481

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-11-29 16:54:49 +03:00
edcbd53425 feat: Read/Delivery status for Whatsapp Cloud API (#5157)
Process field statuses received in webhook WhatsApp cloud API

ref: #1021

Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2022-11-29 15:51:37 +03:00
Tejaswini ChileandGitHub a397f01692 fix: unassign team activity message (#5969) 2022-11-29 13:35:08 +05:30
Vishnu NarayananandGitHub 4755031e1d feat: use sendmail for email as default (#5899)
* feat: use sendmail for the email if SMTP_ADDRESS is empty
2022-11-29 09:13:27 +05:30
Tejaswini ChileandGitHub fc9fc5a661 fix: destroy bulk service (#5921) 2022-11-25 22:46:50 +05:30
b05d06a28a feat: Ability to lock to single conversation (#5881)
Adds the ability to lock conversation to a single thread for Whatsapp and Sms Inboxes when using outbound messages.

demo: https://www.loom.com/share/c9e1e563c8914837a4139dfdd2503fef

fixes: #4975

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
2022-11-25 13:01:04 +03:00
Vishnu NarayananandGitHub 8813c77907 chore: add ph-no-capture css class to messages (#5932)
This ensure posthog replaces the corresponding elements with an empty
block in recordings.

ref: https://posthog.com/manual/recordings#ignoring-sensitive-elements
2022-11-24 10:42:28 -08:00
Sojan JoseandGitHub 8ea0660862 chore: Add reauthorization prompt for Whatsapp Channel (#5929)
- Add reauthorization prompt for Whatsapp Channel

fixes: #5782
2022-11-24 14:50:32 +03:00
606fc9046a feat: Allow users to mark a conversation as unread (#5924)
Allow users to mark conversations as unread.
Loom video: https://www.loom.com/share/ab70552d3c9c48b685da7dfa64be8bb3

fixes: #5552

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-24 10:55:45 +03:00
Pranav Raj SandGitHub e593e516b8 chore: Enable Latvian (lv) language (#5920) 2022-11-22 12:54:13 -08:00
Sojan JoseandGitHub b5f8524167 chore: Update translations from Crowdin (#5883) 2022-11-22 11:42:29 -08:00
Sivin VargheseandGitHub b765e17457 fix: Sidebar missing at 1200px width (#5917) 2022-11-22 10:48:15 -08:00
Fayaz AhmedandGitHub db37bfea06 fix: Add word-break to canned response list table content 2022-11-22 23:53:15 +05:30
Pranav Raj SandGitHub 16bfd68d95 chore: Allow admins to choose the agent bot from the UI (#5895) 2022-11-18 08:54:32 -08:00
Fayaz AhmedandGitHub 33aacb3401 Add team option in bulk actions (#5885) 2022-11-18 14:44:36 +05:30
47676c3cce feat: Allow agent-bots to be created from the UI (#4153)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-17 22:15:58 -08:00
Tejaswini ChileandGitHub 9bfbd528ef feat: Assign team with teams none option (#5871) 2022-11-17 14:15:16 +05:30
Tejaswini ChileandGitHub e85f998a08 feat: Remove labels in macro (#5875) 2022-11-17 12:30:47 +05:30
Pranav Raj SandGitHub 66044a0dc3 feat: Show last non-activity messages in the chat list (#5864) 2022-11-16 15:43:55 -08:00
Pranav Raj SandGitHub 9b9c019de0 feat: Add support for after param in messages API (#5861) 2022-11-16 08:11:48 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
86e0ff76c5 chore(deps): bump loader-utils from 1.4.1 to 1.4.2 (#5859)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 18:56:59 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
abbb6ac676 chore(deps): bump minimatch from 3.0.4 to 3.1.2 (#5860)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 18:56:50 -08:00
Pranav Raj SandGitHub 42b466bda2 chore: Cleanup the design in widget builder (#5852) 2022-11-15 18:56:24 -08:00
Sojan 956837ded5 Merge branch 'release/2.11.0' into develop 2022-11-16 00:45:43 +00:00
Sojan 8a0d6f6f50 Merge branch 'release/2.11.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-11-16 00:45:34 +00:00
Sojan f0ef497005 Bump version to 2.11.0 2022-11-16 00:40:38 +00:00
Sojan JoseandGitHub 8e2da837d4 chore: Update translations from Crowdin 2022-11-16 00:37:29 +00:00
Sojan JoseandGitHub e7f1a9ab4d chore: Enable Macros for all accounts (#5858)
- migrations to enable macros for all accounts
2022-11-16 00:33:09 +00:00
Tejaswini ChileandGitHub 826a735cdb fix: Assign agent action changes (#5827) 2022-11-15 13:15:27 +05:30
Tejaswini ChileandGitHub 38ab3c36db fix: send label list not object in event data presenter (#5853) 2022-11-15 12:20:06 +05:30
b5f7be0cd2 fix: Full name update when creating a conversation without an email id (#5832)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-14 19:39:46 -08:00
Tejaswini ChileandGitHub efceaec950 fix: Activity message generation for team assignemnt automation (#5846) 2022-11-11 19:07:24 +05:30
Fayaz AhmedandGitHub 6aba352e0d fix: Single select for agents and teams in Macros actions (#5837)
* Ignore settings.json

* Single select dropdown for teams and agents
2022-11-10 20:09:33 +05:30
9eb861a3b7 feat: Custom attributes in automations and refactor (#4548)
* Custom attributes

* Custom Attrs Manifest

* Fix dropdown values for custom attributes

* Handle edit mode for custom attributes

* Ported duplicate logic to a mixin

* fix Code climate issue

* Fix Codeclimate complexity warning

* Bug fix - Custom attributes getting duplicated

* Bug fixes and Code Climate issue fix

* Code Climate Issues Breakdown

* Fix test spec

* Add labels for Custom attributes in dropdown

* Refactor

* Refactor Automion mixin

* Refactor Mixin

* Refactor getOperator

* Fix getOperatorType

* File name method refactor

* Refactor appendNewCondition

* spec update

* Refactor methods

* Mixin Spec update

* Automation Mixins Test Specs

* Mixin Spec Rerun

* Automation validations mixin spec

* Automation helper test spec

* Send custom_attr key

* Fix spec fixtures

* fix: Changes for custom attribute type and lower case search

* fix: Specs

* fix: Specs

* fix: Ruby version change

* fix: Ruby version change

* Removes Lowercased values and fix label value in api payload

* Fix specs

* Fixed Query Spec

* Removed disabled labels if no attributes are present

* Code Climate Fixes

* fix: custom attribute with indifferent access

* fix: custom attribute with indifferent access

* Fix specs

* Minor label fix

* REtrigger circle ci build

* Update app/javascript/shared/mixins/specs/automationMixin.spec.js

* Update app/javascript/shared/mixins/specs/automationMixin.spec.js

* fix: Custom attribute case insensitivity search

* Add missing reset action method to input

* Set team_input to single select instead of multiple

* fix: remove value case check for date,boolean and number data type

* fix: cognitive complexity

* fix: cognitive complexity

* fix: Fixed activity message for automation system

* fix: Fixed activity message for automation system

* fix: Fixed activity message for automation system

* fix: codeclimate

* fix: codeclimate

* fix: action cable events for label update

* fix: codeclimate, conversation modela number of methods

* fix: codeclimate, conversation modela number of methods

* fix: codeclimate, conversation modela number of methods

* fix: codeclimate, conversation modela number of methods

* Fix margin bottom for attachment button

* Remove margin bottom to avoid conflict from macros

* Fix automation action query generator using the right key

* fix: not running message created event for activity message

* fix: not running message created event for activity message

* codeclimate fix

* codeclimate fix

* codeclimate fix

* Update app/javascript/dashboard/mixins/automations/methodsMixin.js

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

* Update app/javascript/shared/mixins/specs/automationHelper.spec.js

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

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

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

* Update app/javascript/dashboard/mixins/automations/methodsMixin.js

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

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-11-10 10:53:29 +05:30
Sojan JoseandGitHub 3184c8964d chore: Update translations from Crowdin (#5831) 2022-11-09 20:26:30 -08:00
865346223b fix: Add missing dropdown method (#5830)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-09 17:27:04 -08:00
Nithin David ThomasandGitHub 4f82859bba chore: Design improvements for thumbnail and dropdown (#5822) 2022-11-09 16:52:30 -08:00
47c90e2085 feat: Add a loader till the dashboard app is loaded (#5814)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-11-09 10:06:09 -08:00
7352b928da feat: Add assign agent option in macro (#5821)
Co-authored-by: fayazara <fayazara@gmail.com>
2022-11-09 09:52:48 -08:00
Muhsin KelothandGitHub 5febdde938 chore: Add feature flag for mobile v2 (#5797) 2022-11-08 21:56:02 -08:00
Nithin David ThomasandGitHub d39ace5a6b feat: Improve image loading for thumbnails (#5823) 2022-11-08 21:05:13 -08:00
Sojan JoseandGitHub e2059cfc5b fix: SocketError: getaddrinfo: for imap channels (#5824)
fixes: #5431
2022-11-08 20:23:46 -08:00
Sojan JoseandGitHub 2e42821c48 chore: Update translations from Crowdin (#5810) 2022-11-08 09:36:24 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
16d59f4bb0 chore(deps): bump loader-utils from 1.4.0 to 1.4.1 (#5816)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 09:33:35 -08:00
0d9ed0674b feat: Add store for conversation watchers (#5808)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-08 09:33:14 -08:00
6ff0c93659 feat: Ability to receive location on whatsapp inbox (#5742)
- Ability to  receive location messages on WhatsApp Inbox

ref: https://github.com/chatwoot/chatwoot/issues/3398

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-11-07 21:36:47 -08:00
Nithin David ThomasandGitHub 20406dce01 feat: Adds component to show location based messages (#5809)
- Adds a component to show location-type messages in the dashboard
2022-11-07 20:50:07 -08:00
smartdev58andGitHub b50890d1b5 chore: Update data format for platform API feature management (#5718)
Updated JSON data format for Platform API for account creation update API endpoints features flags to accept false values on each feature. 

fixes: #5717
2022-11-07 17:49:45 -08:00
Tejaswini ChileandGitHub 48373628a1 fix: Macros authorizations (#5779)
Macros policy update.

ref: #5730
2022-11-07 17:46:00 -08:00
CristianDutaandGitHub 479d88a480 fix: Identifier not persisted on customer created via Inbox API Channel (#5804)
- Fixes the identifier not being used to identify the contact, this results in having a new contact created every time the email or phone is not supplied.

Fixes: #5704
2022-11-07 16:02:45 -08:00
Pranav Raj SandGitHub 526722dffa fix: Update invalid payload for template messages (#5802) 2022-11-07 15:21:47 -08:00
Tejaswini ChileandGitHub a23974d8b9 Feat/5733 Add private note action in macros (#5805) 2022-11-07 22:12:10 +05:30
matenautaandGitHub 894234e777 chore: Remove quotes from SMTP_USERNAME (#5800)
Removing quotes related to https://github.com/chatwoot/chatwoot/issues/4787
2022-11-06 16:06:18 -08:00
Nithin David ThomasandGitHub dc3ee3464b feat: Add component for grouped thumbnails (#5796) 2022-11-03 22:38:45 -07:00
Pranav Raj SandGitHub 4bb5e812ba fix: Allow ending the conversation if snoozed or pending (#5793) 2022-11-03 13:47:24 -07:00
Nithin David ThomasandGitHub 8bd5ba187a fix: Fix widget thumbnail not rendering background colors (#5791) 2022-11-02 22:13:12 -07:00
mjattiotandGitHub c121b44df4 fix: GCP Redis managed don't support redis client setname command (#4422)
If using Redis on GCP, actionable will attempt to use the Redis client setname command. However, the command is not supported.
So Introducing `REDIS_DISABLE_CLIENT_COMMAND` environment variable will let you solve this issue. 

ref: https://github.com/rails/rails/issues/38244#issuecomment-575454444
2022-11-02 19:14:51 -07:00
CristianDutaandGitHub 4c43330b15 feat: Add inbox details endpoint (#5549)
This change targets the public API and is related to the Inbox with channel type API.
Exposes public inbox details under /public/api/v1/inboxes/{inbox_identifier}. This allows access to feature flags and business hours configured for the inbox.

ref: #5514
2022-11-02 19:05:03 -07:00
Sojan JoseandGitHub 8b659de73d chore: Use connection_pool for redis (#5790)
fixes: #3199
2022-11-02 17:31:20 -07:00
Tejaswini ChileandGitHub 936c2ec7e2 fix: Ensure Automation rule executions are account scoped (#5768)
This is one possible fix to tackle with cached automation rules when automation gets called on two different accounts with the same event name.

Fixes: https://github.com/chatwoot/product/issues/605
2022-11-02 17:24:35 -07:00
smartdev58andGitHub 9c0cce0392 chore: Mark conversations as pending instead of reopen when bot is present (#5751)
With this change, conversations are marked as pending instead of reopening when a bot is connected to that Inbox. 

Fixes: #5668
2022-11-02 13:54:56 -07:00
Arkadiy AyvazyanandGitHub 86ca7f4a8d fix: Autoloading during initialization deprecation warning (#5628)
Autoloading during initialization deprecation warning fix
fixes: #4012
2022-11-01 20:19:42 -07:00
Sojan JoseandGitHub 6cfd594d85 fix: flaky test whatsapp_cloud_service_spec.rb:17 (#5786)
Fix flaky test: flaky /spec/services/whatsapp/providers/whatsapp_cloud_service_spec.rb:17

example build: https://app.circleci.com/pipelines/github/chatwoot/chatwoot/48955/workflows/a2959d25-19ea-4812-ba15-5aac69c43265/jobs/49523

Cause: factory bot can create phone numbers of length 15 digits, which is valid e164, while our regex only handled up to 14 digits
2022-11-01 19:51:42 -07:00
Sivin VargheseandGitHub e1190fd9bf fix: Text colour is getting merged with the light background colour (#5773) 2022-11-02 05:52:00 +05:30
Stephen Paul WeberandGitHub f2753df8df chore: Use multiple connections in Redis connection pool (#5574)
- The initializer set up a connection pool, but both pools created namespace wrappers around a single global connection. Splitting them up.
2022-11-01 16:49:26 -07:00
Tejaswini ChileandGitHub 00e06e5139 fix: Unsupported message type (#5783)
- fix handling unsupported message types
2022-11-01 15:21:45 -07:00
Fayaz AhmedandGitHub be516a5ea6 fix: Filename issue while editing a macro with attachment action (#5775) 2022-11-01 16:20:09 +05:30
givetimetolifeandGitHub f8d9a27d7a fix: db/seeds.rb field contact_inbox is undefined (#5743)
fixes rails db:chatwoot_prepare error: field contact_inbox is undefined
2022-11-01 00:52:07 -07:00
Muhsin KelothandGitHub 92724576af fix: Update conversation read status indicator logic (#5777) 2022-10-31 09:35:48 -07:00
Tejaswini ChileandGitHub a0606d36f6 fix: Set message sender to macros excution (#5769) 2022-10-31 19:33:12 +05:30
Muhsin KelothandGitHub 2073a23d5c chore: Fix Thumbnail component specs (#5776) 2022-10-28 14:19:12 +05:30
Sivin VargheseandGitHub b20f5e5cef feat: Adds URL validation for domain and home page links (#5761) 2022-10-28 06:21:38 +05:30
Nithin David ThomasandGitHub 3b09840d39 chore: Fix import paths in storybook (#5772) 2022-10-28 01:42:24 +05:30
2aa99ee137 fix: Fix timestamp auto-update in conversations chat list (#5640)
* fix: Fix timestamp auto-update

* fix: rewrite `setInterval` to `setTimeout`

* fix: change refresh time logic

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-10-28 01:05:39 +05:30
David KubešandGitHub 89d7e4ead6 chore: refactor thumbnail (#5682) 2022-10-28 01:02:23 +05:30
Sojan JoseandGitHub 12cd15b6ad chore: Disable email processing for suspended accounts (#5762)
- Disable email processing for suspended accounts
2022-10-26 03:40:47 -07:00
Sivin VargheseandGitHub 352558dd11 fix: Update color for the action button used in card messages (#5740) 2022-10-25 16:17:05 -07:00
Pranav Raj SandGitHub bedb2cab63 Use @page-change instead of on-page-change (#5749) 2022-10-26 03:46:09 +05:30
abe439594e fix: Add preference to choose browser lang for widget settings page (#5726)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-25 15:04:29 -07:00
bcde84b5b5 feat: Add ability to paste file/image from clipboard (#5627)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-10-25 13:35:11 +05:30
06e2219110 chore: Improve macros stability (#5700)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-24 23:49:19 -07:00
c3ec1d4f8a feat: Add the ability for the agents to execute a macro (#5698)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-24 20:33:59 -07:00
Nithin David ThomasandGitHub d54392cb53 fix: Update max-width to fix overflow for emoji selector (#5727) 2022-10-24 19:59:36 -07:00
Sojan JoseandGitHub 3a71fe3260 chore: Stop duplicate websocket updates for conversation updates (#5711)
- remove extra dispatch for label updates
2022-10-21 18:06:02 -07:00
af020f446e fix: check the content type for the file when uploading from cloud storage (#5378)
When sending the message with audio, only the signed id of the file is sent.
In the back end check only the UploadedFile type.
The attachment has the default file type image, now it gets the content type from the signed id

Fixes: #5375

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-10-21 18:05:36 -07:00
Pranav Raj SandGitHub 6823b04e5b fix: Update public partials to fix help center search (#5713) 2022-10-21 17:32:01 -07:00
Nithin David ThomasandGitHub 8d5a9a9daa fix: Show account switch modal from portal dashboard (#5712) 2022-10-21 17:24:52 -07:00
c3426929d7 chore: Refactor sidebar components used in help center (#5695)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-21 16:43:43 -07:00
4a299a9441 fix: Add an action cable events for label updates (#5694)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-21 16:12:35 -07:00
782165478b fix: Update article count in portal admin dashboard (#5647)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-21 13:43:15 -07:00
Pranav Raj SandGitHub 95cc55d043 fix: Update pagination logic in the help center (#5693) 2022-10-20 20:05:17 -07:00
Tejaswini ChileandGitHub a274a1702a chore: Macros enhancement (#5609)
- Fixed send_attachment and send_email_transcript
- Fixed duplicate activity messages
- Fixed Order of execution

Fixes: #5584
2022-10-20 19:41:48 -07:00
Chad BurggrafandGitHub 4d0b302802 Avoid crashing when AudioContext is not available. (#5641)
#4942. We've also had a number of crash reports show up in our logs related to this. Typically we see "undefined is not a constructor" because of the `window.AudioContext || window.webkitAudioContext` returns `undefined`.
2022-10-20 19:13:20 -07:00
Pranav Raj SandGitHub a8561cd798 fix: Add portal pack to tailwind config (#5686) 2022-10-19 21:49:34 -07:00
fa73b5290c chore: Allow feature flag parameters in platform API for account creation (#5589)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-19 21:16:36 -07:00
a3277b45af feat: Update conversation attributes in realtime when they changed (#5542)
Co-authored-by: daniel gannage <daniel@pxdel.com>
Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
2022-10-19 17:26:10 -07:00
10d86fbb35 chore: Ability to Remove password info from sentinel config (#4550)
Introduce the REDIS_SENTINEL_PASSWORD environment variable to customize the behaviour of sentinel passwords. 

Co-authored-by: EXT02D22861 <nusret.ozates@consultant.turkcell.com.tr>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-10-19 17:25:16 -07:00
22d5703b92 feat: Macros listing and Editor (#5606)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-19 17:13:13 -07:00
1fb1be3ddc feat: Add search functionality for public portal (#5683)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-19 17:09:32 -07:00
bce0bb8acb chore: Improve pr and bug report templates (#5556)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-19 13:45:32 -07:00
Tejaswini ChileandGitHub ceaffe862a Fix: Handled IG unsupported file type (#5650)
We get 'unsupported_type' in the web-hook event only when Instagram faces issues processing the attachments. https://developers.facebook.com/docs/messenger-platform/instagram/features/webhook/ according to their document, we are handling the given types and are ignoring this one for now.

Fixes: #5428
2022-10-19 13:44:17 -07:00
Sojan JoseandGitHub 199f462af4 chore: Update translations from Crowdin (#5663) 2022-10-19 13:27:10 -07:00
David KubešandGitHub c542d2e0ff chore: Refactor urlParamsHelper.js (#5639) 2022-10-19 13:20:40 -07:00
6bc34db932 fix: Make links more accessible on helpcenter public views (#5681)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-19 13:07:44 -07:00
Tejaswini ChileandGitHub 0343acdb7e fix: ensure contact_inbox if contact exists(#5667)
- Fixing Instagram issue for existing contacts in the inbox
2022-10-19 12:56:39 -07:00
f740727177 Added testcases for AddReminder Component (#5538)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-10-20 00:54:08 +05:30
Fayaz AhmedandGitHub 3de8f256cb fix: Avoid overflowing submenus in conversation context menu (#5113)
* Scroll overflowing content inside submenus

* Disable submenus if options are not available
2022-10-19 12:23:53 -07:00
Muhsin KelothandGitHub 2e7ab484bd fix: Discard invalid contact attributes in widget conversation end point (#5664)
Fixes: chatwoot/product#601
2022-10-18 13:16:29 -07:00
smartdev58andGitHub e34e975776 chore: ability to delete user in super admin console
fixes: #4164
2022-10-18 01:05:28 -07:00
Sojan a1ce188dab Merge branch 'release/2.10.0' into develop 2022-10-17 19:38:42 -07:00
Sojan ce9c8645df Merge branch 'release/2.10.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-10-17 19:38:31 -07:00
Sojan 2f7a16ae16 Bump version to 2.10.0 2022-10-17 19:31:53 -07:00
Pranav Raj SandGitHub 71ca530292 fix: Fix typo in help center (#5661) 2022-10-17 18:59:22 -07:00
Pranav Raj SandGitHub e19c6d5671 chore: Add editor toggle for API inbox (#5660) 2022-10-17 18:52:51 -07:00
Sojan JoseandGitHub 2423def8e8 chore: Add attachments key to message_created webhook payload (#5659)
- Add attachments key to `message_created` webhook payload
2022-10-17 17:36:56 -07:00
1c44e43c43 fix: Fix overflow issue for category name in article list (#5658)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-17 15:59:18 -07:00
Sivin VargheseandGitHub 444809cc68 fix: Added validation for check box in the pre-chat form (#5648) 2022-10-17 15:00:02 -07:00
Pranav Raj SandGitHub 20b4a91122 chore: Add feature flags in the settings console (#5657) 2022-10-17 14:59:44 -07:00
Nithin David ThomasandGitHub 73f5595762 chore: Sync colors from dashboard to tailwind config (#5656) 2022-10-17 13:13:02 -07:00
Sojan JoseandGitHub 704554d453 chore: Update translations (#5644) 2022-10-17 11:14:29 -07:00
Muhsin KelothandGitHub 706ab872f3 fix: Disable name in pre-chat form if the name is already provided in setUser (#5466) 2022-10-17 20:59:17 +05:30
Nithin David ThomasandGitHub 252eda14c6 chore: Add woot button to message context menu (#5638) 2022-10-16 16:48:32 -07:00
ce3730d640 fix: Avoid email icon getting distorted (#5633)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-14 13:38:08 -07:00
Sojan JoseandGitHub db53af91e7 chore (#5636)
* New translations conversation.json (Latvian)

* New translations bulkActions.json (Portuguese, Brazilian)

* New translations agentMgmt.json (Latvian)

* New translations teamsSettings.json (Latvian)

* New translations contactFilters.json (Latvian)

* New translations automation.json (Latvian)

* New translations attributesMgmt.json (Latvian)

* New translations labelsMgmt.json (Latvian)

* New translations settings.json (Latvian)

* New translations integrations.json (Latvian)

* New translations inboxMgmt.json (Latvian)

* New translations generalSettings.json (Latvian)

* New translations contact.json (Latvian)

* New translations helpCenter.json (Latvian)
2022-10-14 12:46:41 -07:00
David KubešandGitHub a6960dc2d3 chore: Refactor widget (#5621) 2022-10-14 09:13:11 +05:30
Sojan JoseandGitHub e310230f62 chore: Refactor Contact Inbox Builders (#5617)
- Remove duplicate code and move everything to builders
- fixes: #4680
2022-10-13 15:12:04 -07:00
Nithin David ThomasandGitHub 1f271356ca feat: Update the design for dropdown buttons (#5625) 2022-10-13 13:36:42 -07:00
bf4338ef9e feat: Make category name in article table clickable (#5626)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-13 13:35:11 -07:00
Tejaswini ChileandGitHub a533f43fbf fix: Stop raising errors for unsupported Whatsapp messages (#5541)
- Handle unsupported Whatsapp messages
2022-10-13 13:31:49 -07:00
Vishnu NarayananandGitHub 8f4944fda0 chore: revert arm64 docker build in gh action (#5619)
ref: https://github.com/chatwoot/chatwoot/pull/5575

https://github.com/chatwoot/chatwoot/pull/5575#issuecomment-1277208625
2022-10-13 13:46:28 +05:30
Pranav Raj SandGitHub d2fd05ee4e fix: Show webhook url only on WhatsApp inbox (#5618) 2022-10-12 21:45:28 -07:00
Nithin David ThomasandGitHub ee520bdf98 feat: Show last active portal articles when sidebar portal icon is clicked (#5616) 2022-10-12 16:22:44 -07:00
6c048626d0 chore: Replace deprecated functions (#5611)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-12 14:55:59 -07:00
David KubešandGitHub 0c8f744c33 chore: Remove unnecessary methods and polyfills (#5614) 2022-10-12 14:42:06 -07:00
fca629a32a fix: Update timezone to get wday from working_hours (#5605)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-12 14:32:54 -07:00
David KubešandGitHub 1b5a335f93 fix: Update .editorconfig to fix spaces and indent_style (#5612) 2022-10-12 14:00:42 -07:00
Muhsin KelothandGitHub 242de0b3f9 chore: Vscode extension recommendations (#5607)
* Added vscode extension recommendations

* Revert the change

* Revert .gitignore

* Change `volar` to `vetur`
2022-10-12 23:32:24 +05:30
Jordan BroughandGitHub 1bdd59f025 Find by downcased email in SupportMailbox (#5211) 2022-10-12 13:38:18 +05:30
Fayaz AhmedandGitHub 32d885a19b feat: Add macros routes and views (#5604) 2022-10-11 23:20:20 -07:00
Fayaz AhmedandGitHub 6c160ccad5 feat: Add API module and Vuex store for Macros (#5603) 2022-10-11 22:54:17 -07:00
Pranav Raj SandGitHub 9b5c0de0ea chore: Add router views for agent_bots (#5600) 2022-10-11 17:58:52 -07:00
38776906ab chore: Generate webhook-verify-token automatically (#5593)
- Autogenerate webhook verification token in the WhatsAppCloud channel.

Co-authored-by: Sojan <sojan@pepalo.com>
2022-10-11 17:32:31 -07:00
Pranav Raj SandGitHub 5f4b6f2ce4 chore: Add AgentBot API module (#5599) 2022-10-11 17:23:57 -07:00
7419e413f4 fix: Added "None" option in bulk actions assignment menu (#5585)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-11 13:44:35 -07:00
0b5a956e05 chore: Update the design for emoji picker (#4244)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-11 12:59:28 -07:00
Tejaswini ChileandGitHub 2c8ded98aa fix: Update format in password reset page (#5596) 2022-10-11 11:27:22 -07:00
Sojan JoseandGitHub d727093538 chore: Update translations from Crowdin (#5578) 2022-10-10 15:40:12 -07:00
Sojan JoseandGitHub 5bd5395d31 chore: Add missing indexes for attachments table (#5588)
- index for attachments table
- index for conversations table
2022-10-10 15:23:33 -07:00
Sojan JoseandGitHub 779f815f8e chore: Update translations (#5566) 2022-10-07 09:08:18 -07:00
Jordan BroughandGitHub ce7d9be633 Fix "presence" checks in Channel::TwilioSms (#5206) 2022-10-07 10:22:33 +05:30
Pranav Raj SandGitHub 788b766179 feat: Quickly create canned responses (#5563) 2022-10-05 22:00:15 -07:00
0a9ea6e272 chore(deps): bump google-protobuf from 3.21.2 to 3.21.7 (#5550)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.21.2 to 3.21.7.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.21.2...v3.21.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-10-05 17:32:00 -07:00
b668723313 chore: Ability to change default account (#5393)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
2022-10-05 17:31:12 -07:00
Geophilus DurairajandGitHub bd445216e9 fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560)
fixes the warning: Rendering actions with '.' in the name is deprecated
2022-10-05 17:24:34 -07:00
Pranav Raj SandGitHub cd4c1ef27e feat: Update the design of mentions with thumbnail (#5551) 2022-10-05 14:18:16 -07:00
Sojan JoseandGitHub 8b0e95ece8 fix: Flakiness in CI pipeline (#5562)
- Fixing the recent flakiness in CI pipelines
2022-10-05 10:59:31 -07:00
7b1630b468 feat: Enable Docker Buildx multi-arch builds with arm64 support(#5545)
Fixes #2575

multi-arch images with arm64 support CE edition images

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2022-10-05 17:07:49 +05:30
Sojan JoseandGitHub c76aed6d5e chore: Update translations from Crowdin (#5546) 2022-10-04 18:14:35 -07:00
8df7547043 feat: Add support for draft messages in reply box (#4440)
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: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-10-03 21:29:02 -07:00
beedfc47bf feat: Allow users to select Cmd+Enter as a hotkey (#4401)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-10-03 15:27:34 -07:00
9ea43a2678 chore: Improve Nginx settings for speed and security (#5144)
* fix: Fixes #5138

* Move to helper function

* Improve Nginx settings

* chore: set ssl_prefer_server_ciphers to off
ssl_prefer_server_ciphers should be set to  `off` in a modern context.

ref: https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=modern&openssl=1.1.1k&guideline=5.6

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2022-10-03 17:43:50 +05:30
Nithin David ThomasandGitHub 705d06ac3c fix: Avoid editor formatting issues when a canned response is edited (#5533) 2022-09-30 15:03:33 -07:00
Tejaswini ChileandGitHub 7b54990ae6 fix: Updated IMAP errors add method (#5520)
fixes: #5519
2022-09-30 11:33:00 -07:00
Jordan BroughandGitHub 4f0360c7a2 chore: Allow setting "users.display_name" in Platform API (#5532) 2022-09-30 11:28:18 -07:00
Tejaswini ChileandGitHub 57fcb79d71 fix: Article slug auto saves (#5524)
- Auto save article slug
2022-09-30 07:25:23 -07:00
1819041f5a fix: "wa_source_id" function return value (#5451)
- Fix contact inbox builder returning invalid WhatsApp source id
- Add specs to cover source id validations

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-09-29 10:34:55 -07:00
Sojan JoseandGitHub 74e03f9beb chore: Update translations from Crowdin (#5523) 2022-09-28 21:59:41 -07:00
Chamath K.B. AttanayakaandGitHub 6b47c7b43d fix: Attachment not sending to bots message creation (#5353) 2022-09-28 13:13:29 -07:00
Tejaswini ChileandGitHub fcb9a9ab0c fix: contact is not available for inaccessible sender (#5509)
Fixes: #5508

We can not read contact information because of this error, as the messages echo when the sender sends messages to contacts. We don't have the user's consent until and unless they send messages to us.

So after this result, information about the contact is empty, and we are trying to create a contact inbox for the same, and the error appears.

type: OAuthException, code: 230, message: (#230) User consent is required to access user profile, x-fb-trace-id: AaitxF/whwY [HTTP 403] (Koala::Facebook::ClientError)
2022-09-28 12:50:23 -07:00
Pranav Raj SandGitHub 83eee7df91 chore: Set locale in default_locale (#5515) 2022-09-28 08:29:00 -07:00
Tejaswini ChileandGitHub 543854eaa8 fix: Remove the notification subscription if present (#5510) 2022-09-27 12:36:57 -07:00
Tejaswini ChileandGitHub 336c09e072 fix: Add all articles count to article API (#5497) 2022-09-27 12:35:53 -07:00
Tejaswini ChileandGitHub c1c57fb2cd fix: Add slug to articles (#5500) 2022-09-27 12:27:18 -07:00
Sojan 8e5d8fcdaf Merge branch 'release/2.9.1' into develop 2022-09-22 14:22:40 -07:00
Sojan 7ad5ddaf8a Merge branch 'release/2.9.1'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-09-22 14:22:29 -07:00
Sojan d2d7355e2d Bump version to 2.9.1 2022-09-22 14:18:30 -07:00
Sojan JoseandGitHub 913224ad84 chore: Normalize portal slug to nil (#5487) 2022-09-22 14:08:48 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b463ce5b1a chore(deps): bump commonmarker from 0.23.5 to 0.23.6 (#5480)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.5 to 0.23.6.
- [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.5...v0.23.6)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-21 20:43:08 -07:00
Tejaswini ChileandGitHub 111016fe4c fix: Add not found status if macro not found (#5473) 2022-09-21 14:10:35 +05:30
Pranav Raj SandGitHub cc4ef14faa chore: Fix link generation logic in help-center (#5470) 2022-09-20 18:23:28 -07:00
2d871a1ed5 fix: Hide conversation links in input_csat message in non-website channels (#5469)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-09-20 17:15:32 -07:00
Tejaswini ChileandGitHub c556e9c694 Fix: Redirect to portal with default locale (#5467)
- Redirect to default locale if URL does not provide the locale param
2022-09-20 10:31:39 -07:00
Nithin David ThomasandGitHub d28502b917 Bug: Adds support multiline text input on article edit page (#5465)
* Bug: Scroll issue with article list page

* Adds support multiline text input on article edit page
2022-09-20 22:42:09 +05:30
Pranav Raj SandGitHub 1761100c77 chore: Remove static URLs from the documentation (#5461) 2022-09-19 21:52:01 -07:00
Sojan 3a1e521b4c Merge branch 'release/2.9.0' into develop 2022-09-19 20:37:02 -07:00
Sojan 85d3f91dac Merge branch 'release/2.9.0'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-09-19 20:36:55 -07:00
Sojan 06c9aad7b3 Bump version to 2.9.0 2022-09-19 20:34:49 -07:00
Pranav Raj SandGitHub eb8e348ec1 chore: Update design of the help-center articles (#5459)
- Update designs
- Fixes meta tags
- Update typography
2022-09-19 20:31:38 -07:00
54d0055e86 chore: Helpcenter routing and UI fixes (#5460)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-09-19 19:40:32 -07:00
Sojan JoseandGitHub 3b7cae19e6 chore: Enable help center for self-hosted accounts (#5458) 2022-09-19 19:39:41 -07:00
Shivam ChaharandGitHub 6b80afaf50 fix: un-assign agent from conversation after removal (#5417)
Unassign agents from the conversation when they are removed from the account.

Fixes: #4555
2022-09-19 18:14:55 -07:00
Sojan JoseandGitHub 99de8f4500 chore: Improve Helpcenter custom domains (#5456)
- Support rendering articles over frontend URL
- Support rendering articles over help center URL
- Support rendering help center home page in the custom domain root
2022-09-19 17:36:01 -07:00
Sivin VargheseandGitHub a773ad7d08 fix: Read status not updated in widget popout mode (#5454) 2022-09-19 15:35:41 -07:00
Sojan JoseandGitHub 97583e410c feat: Ability to manage account features from super admin (#5455)
- This PR adds the ability to enable and disable features for an account from the super admin.
2022-09-19 14:57:21 -07:00
678a0af962 chore: Enable Help Center on Sidebar (#5435)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-09-18 13:08:30 -07:00
Vishnu NarayananandGitHub bc23c69605 chore: Fix gh nightly failure (#5442)
* chore: fix gh nightly failure
2022-09-15 23:16:45 +05:30
Fayaz AhmedandGitHub e585b227f1 chore: Check for empty strings in name formatter (#5434) 2022-09-14 07:15:04 -07:00
Nithin David ThomasandGitHub cb4dd7e633 fix: Fixes bug with locale switching from popover (#5426) 2022-09-13 18:49:55 +05:30
Pranav Raj SandGitHub 8af27d861b chore: Default to rich content editor in website and email channel (#5357) 2022-09-13 05:41:42 -07:00
Jordan BroughandGitHub 59b31615ed chore: Use "create!" and "save!" bang methods when not checking the result (#5358)
* Use "create!" when not checking for errors on the result
* Use "save!" when not checking the result
2022-09-13 17:40:06 +05:30
Sivin VargheseandGitHub 44f498be6d fix: Not able to create a new category through the sidebar (#5421)
* fix: Not able to create a new category through the sidebar

* chore: Minor spacing fixes
2022-09-13 00:15:24 +05:30
1ea289e8b7 feat: Sets up portal public views with rails ERB and tailwind (#5309)
* feat: Sets up portal public views with rails ERB and tailwind

* linter fixes

* Remove duplicate style file

* Shows articles and categories

* Specify layout for articles page

* Updates public portal styles

* Fixes blog content styles

* Portal style updates for article page

* Review fixes

* Adds breadcrumbs

* fix: rspec

* fix: public portal spec

* Code climate fixes

* Adds test cases for missing files

* Show only published articles

* Updates help center routes

* Review fixes

* Render markdown content for aticle body

* Update app/views/public/api/v1/portals/articles/index.html.erb

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

Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: tejaswini chile <tejaswini@chatwoot.com>
2022-09-12 23:36:24 +05:30
Sivin VargheseandGitHub a680b08251 chore: Fixes height issues with seconday sidebar (#5407) 2022-09-12 19:36:49 +05:30
Tejaswini ChileandGitHub db73d033b7 feat: Fetching the portal data related to a specific custom domain (#5249) 2022-09-07 12:22:24 +05:30
Tejaswini ChileandGitHub 6574407636 fix: Track Imap exception in sentry (#5397) 2022-09-07 11:41:56 +05:30
afe31a3156 chore: parallel runs in circle (#2810)
- Enable parallel runs in circle

Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-09-06 19:17:33 +05:30
Pranav Raj SandGitHub cf7dac5bab chore: Add feature flag for conversation continuity in API (#5399)
- Add the ability to toggle conversation continuity in API channel
2022-09-06 18:14:36 +05:30
Sivin VargheseandGitHub 7a5ea89fd9 chore: Sidebar improvements in small screens (#5400)
* chore: Sidebar improvements in small screens

* chore: Minor fixes
2022-09-06 14:06:26 +05:30
Sivin VargheseandGitHub 79406c5775 fix: Emoji picker is not working on the expanded layout (#5398) 2022-09-06 10:41:39 +05:30
Sivin VargheseandGitHub f5e360fd4d fix: Adding a private note clears the CC field in an Email inbox (#5366) 2022-09-05 16:08:28 +05:30
8f873a34a2 feat: Adds the ability to update conversation timeframe automatically (#5253)
* feat: Adds the ability to update conversation timeframe automatically

* Update app/javascript/dashboard/components/ui/TimeAgo.vue

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

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-09-05 16:07:58 +05:30
Sivin VargheseandGitHub 952368948b fix: Alignment issue of edit article dropdown (#5390) 2022-09-05 15:35:52 +05:30
1c590160bb feat: Add locales under portal settings (#5386)
* Add locales under portal settings

* Fix path issue

* chore: Updated category route

* chore: Updated category route

Co-authored-by: iamsivin <iamsivin@gmail.com>
2022-09-05 15:32:14 +05:30
80180a60c5 chore: Final touches for portals (#5388)
* chore: Final touches for portals

* Review fixes

* Minor fixes

* Fixes styles for input and buttons

* Minor fixes

* Spacing fixes on header

* Minor fixes

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-09-05 12:46:27 +05:30
329e8c37c8 fix: Validations for updating team members (#5384)
fixes: chatwoot/product#539

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2022-09-02 23:09:29 +05:30
Sojan JoseandGitHub 9525d4f034 chore: Improve rack-attack configuration (#5389)
fixes: https://github.com/chatwoot/product/issues/540
2022-09-02 23:09:03 +05:30
Sivin VargheseandGitHub d47a0ae461 feat: Adds the ability to edit/delete category (#5385) 2022-09-02 22:34:07 +05:30
Nithin David ThomasandGitHub a9801a3c76 design: Fixes to make portal page design close to figma mockups (#5383) 2022-09-02 18:07:17 +05:30
Sojan JoseandGitHub 8bdd229adb chore: Update security guidelines (#5382)
- update security guidelines
2022-09-02 16:59:38 +05:30
03c8251cc3 feat: Adds the ability to publish an article (#5365)
* feat: Adds the ability to publish an article

* chore: Disabled publish button and dropdown when there is no article id

* chore: Review fixes

* chore: Review fixes

* Update app/javascript/dashboard/routes/dashboard/helpcenter/components/Header/EditArticleHeader.vue

* chore: Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-09-02 12:53:18 +05:30
Muhsin KelothandGitHub b16c5de7ca Add fix for portal update issue (#5381) 2022-09-02 12:32:07 +05:30
Muhsin KelothandGitHub 403ff1a679 feat: Add the ability update/edit locale in portal (#5377) 2022-09-02 11:45:03 +05:30
a1663e4e49 feat: Adds pages to edit portals (#5373)
* feat: Adds pages to edit portals

* Update app/javascript/dashboard/i18n/locale/en/helpCenter.json

* Update app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js

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

* Review fixes

* Adds translations

* Fixes broken tests

* Update app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue

* Update app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2022-09-02 10:22:15 +05:30
Muhsin KelothandGitHub 504d339dd7 feat: Adds the ability to add new locale in portal (#5363) 2022-09-01 22:19:30 +05:30
Sojan JoseandGitHub 7f3f6f7129 fix: Account seeder error on staging (#5371)
- Fix for Account seeding error on staging environments
2022-09-01 21:23:57 +05:30
Sojan JoseandGitHub 4a74ab59d2 chore: Add a feature toggle for account seeding (#5369) 2022-09-01 17:19:15 +05:30
Sivin VargheseandGitHub c09b10a710 feat: Display identifier in the contacts info panel (#5318) 2022-09-01 17:12:47 +05:30
Pranav Raj SandGitHub 83fb46bc50 chore: Add feature flag for branding (#5370) 2022-09-01 17:12:26 +05:30
Tejaswini ChileandGitHub ee2189d98a fix: Set and Update portal's default locale (#5368) 2022-09-01 16:44:06 +05:30
Sivin VargheseandGitHub f4fc53b425 feat: Adds the ability to delete a portal (#5305) 2022-09-01 13:27:08 +05:30
Muhsin KelothandGitHub 6e945dd61e feat: Add the ability to delete/archive articles (#5319) 2022-09-01 10:55:59 +05:30
Sojan JoseandGitHub c8d01a84ce feat: Ability to seed Demo Accounts (#5352)
Introduces the ability to seed sample data into accounts in development and staging.

fixes: #3429
2022-09-01 00:31:43 +05:30
Nithin David ThomasandGitHub ebea5428bc chore: Moves portal slug as ID to query resources in vue store (#5359) 2022-08-31 19:59:05 +05:30
Sivin VargheseandGitHub d14beeb654 feat: Article settings sidebar in new article page (#5355) 2022-08-30 14:41:27 +05:30
Vishnu NarayananandGitHub d7cbeed13e fix: heorku deploy failure (#5338)
* fix: heorku deploy failure

* fix: set default stack to heroku-20
2022-08-30 11:39:28 +05:30
Sivin VargheseandGitHub a9d687565e chore: Displayed WhatsApp API provider name in inbox settings (#5346) 2022-08-29 12:40:15 +05:30
Jordan BroughandGitHub 9ddf4c205c chore: Add index on conversations.uuid (#5179)
- We search for conversations by this attribute (e.g. in ReplyMailbox and CsatSurveyController) so it seems like we should have an index on it.
2022-08-23 19:05:30 +05:30
Vishnu NarayananandGitHub 5957edc76b feat: abort cwctl upgrade if custom code changes detected (#5329)
* feat: abort cwctl upgrade if custom code changes detected

* fix: cwctl exit handler on upgrade

* chore: update cwctl version
2022-08-23 18:56:39 +05:30
Sivin VargheseandGitHub 8bc560752f fix: File validations for Twilio WhatsApp Channel (#5294)
Fixes: #5289 #2971

- Removed unsupported attachment file format from Twilio WhatsApp Channel. https://www.twilio.com/docs/whatsapp/guidance-whatsapp-media-messages

- Added 5 MB attachment file limit for Twilio SMS Channel.
2022-08-23 18:35:31 +05:30
Tejaswini ChileandGitHub 9c67814724 Fix: Instagram webhook test event (#5317) 2022-08-22 16:10:14 +05:30
Tejaswini ChileandGitHub 747ce9c80f fix: Update automation to use case-insensitive filter (#5302) 2022-08-22 10:16:50 +05:30
bef3f66501 feat: Allow Dashboard App Frames to query the information (#5313)
Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2022-08-22 09:27:35 +05:30
Sojan JoseandGitHub f33ff351cf chore: New Translation updates (#5287) 2022-08-19 13:55:23 +05:30
Muhsin KelothandGitHub a788e7ac7a feat: Create portal UI improvements (#5261) 2022-08-18 17:11:19 +05:30
Tejaswini ChileandGitHub ea918d9c5a fix: send confirmation email on re-adding agent (#5279)
Send confirmation email after re-adding the agent.

Fixes: #4951
2022-08-18 13:12:43 +05:30
Muhsin KelothandGitHub 0cd08065d1 feat: Adds the ability to create a new article (#5255) 2022-08-18 11:45:08 +05:30
Sivin VargheseandGitHub 45d0d101b1 chore: Handled help center sidebar in small screen (#5293) 2022-08-18 11:14:06 +05:30
Sojan 8042810e42 Merge branch 'hotfix/2.8.1' into develop 2022-08-17 19:47:57 +05:30
Sojan 0cfe654b33 Merge branch 'hotfix/2.8.1'
Publish Chatwoot CE docker images / build (push) Waiting to run
2022-08-17 19:47:48 +05:30
Vishnu NarayananandGitHub 1db72dbe52 fix: linux installation failure due to empty db name (#5283) 2022-08-17 16:53:19 +05:30
Sojan 975eed65d7 Bump version to 2.8.1 2022-08-17 15:09:50 +05:30
Muhsin KelothandGitHub b71291619c feat: Adds the ability to edit article (#5232) 2022-08-16 17:55:34 +05:30
Sojan b5e497a6a2 Merge branch 'release/2.8.0' into develop 2022-08-16 17:33:38 +05:30
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
4312 changed files with 342951 additions and 29161 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)
+100 -24
View File
@@ -7,16 +7,20 @@ defaults: &defaults
working_directory: ~/build
docker:
# specify the version you desire here
- image: circleci/ruby:2.7.2-node-browsers
- image: cimg/ruby:3.1.3-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
- COVERAGE: true
- LOG_LEVEL: warn
parallelism: 4
resource_class: large
jobs:
build:
<<: *defaults
@@ -34,26 +38,37 @@ jobs:
name: Which bundler?
command: bundle -v
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v16
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
# Run bundler
# Load installed gems from cache if possible, bundle install then save cache
# Multiple caches are used to increase the chance of a cache hit
- 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 +77,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 +92,19 @@ 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/6.3.0/openapi-generator-cli-6.3.0.jar > ~/tmp/openapi-generator-cli-6.3.0.jar
java -jar ~/tmp/openapi-generator-cli-6.3.0.jar validate -i swagger/swagger.json
# Database setup
- run: yarn install --check-files
- run: bundle exec rake db:create
@@ -89,6 +117,10 @@ jobs:
- run:
name: Rubocop
command: bundle exec rubocop
# - run:
# name: Brakeman
# command: bundle exec brakeman
- run:
name: eslint
@@ -98,34 +130,78 @@ jobs:
- run:
name: Run backend tests
command: |
bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) --profile=10
~/tmp/cc-test-reporter format-coverage -t simplecov -o ~/tmp/codeclimate.backend.json coverage/backend/.resultset.json
- persist_to_workspace:
root: ~/tmp
paths:
- codeclimate.backend.json
mkdir -p ~/tmp/test-results/rspec
mkdir -p ~/tmp/test-artifacts
mkdir -p coverage
~/tmp/cc-test-reporter before-build
TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
bundle exec rspec --format progress \
--format RspecJunitFormatter \
--out ~/tmp/test-results/rspec.xml \
-- ${TESTFILES}
no_output_timeout: 30m
- run:
name: Code Climate Test Coverage
command: |
~/tmp/cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
- run:
name: Run frontend tests
command: |
yarn test:coverage
~/tmp/cc-test-reporter format-coverage -t lcov -o ~/tmp/codeclimate.frontend.json buildreports/lcov.info
mkdir -p ~/tmp/test-results/frontend_specs
~/tmp/cc-test-reporter before-build
TESTFILES=$(circleci tests glob **/specs/*.spec.js | circleci tests split --split-by=timings)
yarn test:coverage --profile 10 \
--out ~/tmp/test-results/yarn.xml \
-- ${TESTFILES}
- run:
name: Code Climate Test Coverage
command: |
~/tmp/cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.frontend_$CIRCLE_NODE_INDEX.json buildreports/lcov.info
- persist_to_workspace:
root: ~/tmp
root: coverage
paths:
- codeclimate.frontend.json
- codeclimate.*.json
# collect reports
- store_test_results:
path: ~/tmp/test-results
- store_artifacts:
path: ~/tmp/test-results
destination: test-results
path: ~/tmp/test-artifacts
- store_artifacts:
path: log
upload-coverage:
working_directory: ~/build
docker:
# specify the version you desire here
- image: circleci/ruby:3.0.2-node-browsers
environment:
- CC_TEST_REPORTER_ID: caf26a895e937974a90860cfadfded20891cfd1373a5aaafb3f67406ab9d433f
steps:
- attach_workspace:
at: ~/build
- run:
name: Download cc-test-reporter
command: |
mkdir -p ~/tmp
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ~/tmp/cc-test-reporter
chmod +x ~/tmp/cc-test-reporter
- persist_to_workspace:
root: ~/tmp
paths:
- cc-test-reporter
- run:
name: Upload coverage results to Code Climate
command: |
~/tmp/cc-test-reporter sum-coverage ~/tmp/codeclimate.*.json -p 2 -o ~/tmp/codeclimate.total.json
~/tmp/cc-test-reporter upload-coverage -i ~/tmp/codeclimate.total.json
~/tmp/cc-test-reporter sum-coverage --output - codeclimate.*.json | ~/tmp/cc-test-reporter upload-coverage --debug --input -
workflows:
version: 2
commit:
jobs:
- build
- upload-coverage:
requires:
- build
+42 -16
View File
@@ -1,4 +1,4 @@
version: "2"
version: '2'
plugins:
rubocop:
enabled: false
@@ -14,19 +14,45 @@ 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'
- 'app/javascript/dashboard/helper/specs/macrosFixtures.js'
- 'app/javascript/dashboard/routes/dashboard/settings/macros/constants.js'
+4 -47
View File
@@ -1,51 +1,8 @@
# pre-build stage
ARG VARIANT=2.7
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${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
# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# tmux is for overmind
# TODO : install foreman in future
# packages: postgresql-server-dev-all
# may be postgres in same machine
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
libssl-dev \
tar \
tzdata \
postgresql-client \
yarn \
git \
imagemagick \
tmux \
zsh
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
# 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
# TODO: figure out installing rvm
# RUN rvm install
COPY Gemfile Gemfile.lock ./
RUN gem install bundler
RUN bundle install
COPY package.json yarn.lock ./
RUN yarn install
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.1.3"
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
+18 -11
View File
@@ -12,22 +12,29 @@
"extensions": [
"rebornix.Ruby",
"misogi.ruby-rubocop",
"wingrunr21.vscode-ruby"
"wingrunr21.vscode-ruby",
"davidpallinder.rails-test-runner",
"eamodio.gitlens",
"github.copilot",
"mrmlnc.vscode-duplicate"
],
// TODO: figure whether we can get all this ports work properly
// 3000 rails
// 3035 webpacker
// 5432 postgres
// 6379 redis
// 1025,8025 mailhog
"forwardPorts": [5432, 6379, 1025, 8025],
//your application may need to listen on all interfaces (0.0.0.0) not just localhost for it to be available externally. Defaults to []
"appPort": [3000, 3035],
"forwardPorts": [8025, 3000, 3035],
// Use 'postCreateCommand' to run commands after the container is created.
// #TODO: can we move logic of copy env file into dockerfile ?
"postCreateCommand": "cp .env.example .env",
"postCreateCommand": ".devcontainer/scripts/setup.sh && POSTGRES_STATEMENT_TIMEOUT=600s bundle exec rake db:chatwoot_prepare && yarn",
"portsAttributes": {
"3000": {
"label": "Rails Server"
},
"3035": {
"label": "Webpack Dev Server"
},
"8025": {
"label": "Mailhog UI"
}
}
}
+2 -2
View File
@@ -10,8 +10,8 @@ services:
context: ..
dockerfile: .devcontainer/Dockerfile
args:
# Update 'VARIANT' to pick a Ruby version: 2, 2.7, 2.6, 2.5
VARIANT: 2.7
# 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/*"
+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
-1
View File
@@ -11,7 +11,6 @@ storage
public/system
tmp
.codeclimate.yml
public/assets
public/packs
node_modules
vendor/bundle
+2 -2
View File
@@ -7,8 +7,8 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = spaces
indent_style = space
tab_width = 2
[{*.{rb,erb,js,coffee,json,yml,css,scss,sh,markdown,md,html}]
[*.{rb,erb,js,coffee,json,yml,css,scss,sh,markdown,md,html}]
indent_size = 2
+94 -12
View File
@@ -3,6 +3,8 @@ 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
# To use a dedicated URL for help center pages
# HELPCENTER_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
@@ -32,23 +34,38 @@ REDIS_SENTINELS=
# You can find list of master using "SENTINEL masters" command
REDIS_SENTINEL_MASTER_NAME=
# By default Chatwoot will pass REDIS_PASSWORD as the password value for sentinels
# Use the following environment variable to customize passwords for sentinels.
# Use empty string if sentinels are configured with out passwords
# REDIS_SENTINEL_PASSWORD=
# 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
# Changes the Postgres query timeout limit. The default is 14 seconds. Modify only when required.
# POSTGRES_STATEMENT_TIMEOUT=14s
RAILS_MAX_THREADS=5
# 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
# the default value is set "mailhog" and is used by docker-compose for development environments,
# Set the value to "mailhog" if using docker-compose for development environments,
# Set the value as "localhost" or your SMTP address in other environments
SMTP_ADDRESS=mailhog
# If SMTP_ADDRESS is empty, Chatwoot would try to use sendmail(postfix)
SMTP_ADDRESS=
SMTP_PORT=1025
SMTP_USERNAME=
SMTP_PASSWORD=
@@ -57,6 +74,9 @@ SMTP_AUTHENTICATION=
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
@@ -85,9 +105,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
@@ -102,6 +119,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=
@@ -113,10 +133,18 @@ TWITTER_ENVIRONMENT=
SLACK_CLIENT_ID=
SLACK_CLIENT_SECRET=
# Google OAuth
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_OAUTH_CLIENT_SECRET=
GOOGLE_OAUTH_CALLBACK_URL=
### 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
@@ -134,15 +162,69 @@ IOS_APP_ID=6C953F3RX2.com.chatwoot.app
## 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=
## 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
## LogRocket
# LOG_ROCKET_PROJECT_ID=xxxxx/some-project
## 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=
# MaxMindDB API key to download GeoLite2 City database
# 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=
#MS OAUTH creds
AZURE_APP_ID=
AZURE_APP_SECRET=
## Advanced configurations
## Change these values to fine tune performance
# control the concurrency setting of sidekiq
# SIDEKIQ_CONCURRENCY=10
+32 -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,12 +60,10 @@ module.exports = {
},
env: {
browser: true,
node: true,
jest: true,
jasmine: true
node: true,
},
globals: {
__WEBPACK_ENV__: true,
bus: true,
},
};
+35 -11
View File
@@ -6,6 +6,7 @@ labels: 'Bug'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
@@ -16,11 +17,11 @@ Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
4. See the error
**Expected behavior**
A clear and concise description of what you expected to happen.
Share a clear and concise description of what you expected to happen.
**Screenshots**
@@ -28,27 +29,50 @@ If applicable, add screenshots to help explain your problem.
**Browser logs**
Share the browser logs to debug the issue further
Share the browser logs to debug the issue further.
**Server logs**
Share the server logs to debug the issue further
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)
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/Kubernetes/Other).
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- [ ] app.chatwoot.com (Chatwoot Cloud)
- [ ] Self-hosted
- - [ ] Linux VM
- - [ ] Docker
- - [ ] Kubernetes
- - [ ] Heroku
- - [ ] Other (Please specify)
**Desktop (please complete the following information)** (If applicable)
- OS: [e.g. Linux, Windows, MacOS]
- Browser [e.g. chrome, firefox, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
**Smartphone (please complete the following information)** (If applicable)
- Device: [e.g. iPhone6, Pixel7]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Browser [e.g. stock browser, firefox, safari]
- Version [e.g. 22]
**Docker** (If applicable)
Please share the output of the following.
- `docker version`
- `docker info`
- `docker-compose version`
**Cloud Provider** (If applicable)
- [ ] AWS
- [ ] GCP
- [ ] Azure
- [ ] DigitalOcean
- [ ] Others
**Additional context**
Add any other context about the problem here.
+4 -5
View File
@@ -2,8 +2,7 @@
## Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Please include a summary of the change and issue(s) fixed. Also, mention relevant motivation, context, and any dependencies that this change requires.
Fixes # (issue)
## Type of change
@@ -12,18 +11,18 @@ Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Breaking change (fix or feature that would cause existing functionality not to work as expected)
- [ ] This change requires a documentation update
## How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have performed a self-review of my code
- [ ] 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
+37
View File
@@ -0,0 +1,37 @@
# 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
if: ${{ github.repository == 'chatwoot/chatwoot' }}
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.
+52
View File
@@ -0,0 +1,52 @@
# #
# #
# # 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
#fix for postgtres not starting automatically in gh action env
sed -i '/function configure_db() {/a sudo service postgresql start' install.sh
- name: create input file
run: |
echo "no" > input
echo "yes" >> input
- name: Run the installer
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
- name: Upload chatwoot setup log file as an artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: chatwoot-setup-log-file
path: /var/log/chatwoot-setup.log
@@ -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
+63
View File
@@ -0,0 +1,63 @@
# #
# # 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
platforms: linux/amd64
push: true
tags: ${{ env.DOCKER_TAG }}
+83
View File
@@ -0,0 +1,83 @@
# #
# # 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-20.04
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:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v3
with:
node-version: 16
- 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
- name: Upload rails log folder
uses: actions/upload-artifact@v3
if: always()
with:
name: rails-log-folder
path: log
+28
View File
@@ -0,0 +1,28 @@
# This workflow warns and then closes PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests
on:
schedule:
- cron: '28 3 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-close: -1,
days-before-issue-stale: -1
days-before-pr-close: -1,
days-before-pr-stale: 30,
stale-pr-message: '🐢 Turtley slow progress alert! This pull request has been idle for over 30 days. Can we please speed things up and either merge it or release it back into the wild?'
stale-pr-label: 'stale'
+7 -4
View File
@@ -39,9 +39,6 @@ public/packs*
*.un~
.jest-cache
#VS Code files
.vscode
# ignore jetbrains IDE files
.idea
@@ -62,4 +59,10 @@ package-lock.json
test/cypress/videos/*
/config/master.key
/config/*.enc
/config/*.enc
.vscode/settings.json
# yalc for local testing
.yalc
yalc.lock
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# lint js and vue files
npx --no-install lint-staged
# lint only staged ruby files
git diff --name-only --cached | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs bundle exec rubocop --force-exclusion -a
# stage rubocop changes to files
git diff --name-only --cached | xargs 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"
}
+65 -6
View File
@@ -11,8 +11,12 @@ 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'
RSpec/ExampleLength:
Max: 25
Style/Documentation:
@@ -23,13 +27,16 @@ Style/FrozenStringLiteralComment:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/OpenStructUse:
Enabled: false
Style/OptionalBooleanParameter:
Exclude:
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:
@@ -38,12 +45,23 @@ Style/ClassVars:
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'
@@ -51,18 +69,41 @@ Rails/ApplicationController:
- '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
Style/HashSyntax:
Enabled: true
EnforcedStyle: no_mixed_keys
EnforcedShorthandSyntax: never
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'
@@ -73,10 +114,12 @@ 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:
@@ -91,6 +134,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'
@@ -101,18 +145,25 @@ 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
Max: 14
AllCops:
NewCops: enable
Exclude:
@@ -127,4 +178,12 @@ AllCops:
- 'tmp/**/*'
- 'storage/**/*'
- 'db/migrate/20200225162150_init_schema.rb'
- 'config/initializers/azure_storage_service_patch.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
-1
View File
@@ -68,7 +68,6 @@ Naming/AccessorMethodName:
- 'app/controllers/api/v1/accounts_controller.rb'
- 'app/controllers/api/v1/callbacks_controller.rb'
- 'app/controllers/api/v1/conversations_controller.rb'
- 'app/controllers/passwords_controller.rb'
# Offense count: 9
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
+1 -1
View File
@@ -1 +1 @@
2.7.2
3.1.3
+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$/,
},
},
};
+32
View File
@@ -0,0 +1,32 @@
{
"recommendations": [
// Spell check
"streetsidesoftware.code-spell-checker",
// Better Comments
"aaron-bond.better-comments",
// Rails Test Runner
"davidpallinder.rails-test-runner",
// Eslint
"dbaeumer.vscode-eslint",
// Auto Close Tag
"formulahendry.auto-close-tag",
// Auto Rename Tag
"formulahendry.auto-rename-tag",
// Hight light colors
"naumovs.color-highlight",
// GitLens
"eamodio.gitlens",
// Ruby
"rebornix.ruby",
// Vue
"octref.vetur",
// Prettier
"esbenp.prettier-vscode",
// Dot Env
"mikestead.dotenv",
// HTML CSS Support
"ecmel.vscode-html-css",
// Tailwind CSS Intellisense
"bradlc.vscode-tailwindcss",
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"cSpell.words": [
"chatwoot",
"dompurify"
]
}
+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.
+93 -25
View File
@@ -1,10 +1,10 @@
source 'https://rubygems.org'
ruby '2.7.2'
ruby '3.1.3'
##-- base gems for rails --##
gem 'rack-cors', require: 'rack/cors'
gem 'rails'
gem 'rails', '~> 6.1', '>= 6.1.7.3'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', require: false
@@ -31,19 +31,30 @@ gem 'haikunator'
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'
# authentication type to fetch and send mail over oauth2.0
gem 'gmail_xoauth'
# Prevent CSV injection
gem 'csv-safe'
# Support message translation
gem 'google-cloud-translate'
##-- 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'
@@ -51,12 +62,13 @@ gem 'activerecord-import'
gem 'dotenv-rails'
gem 'foreman'
gem 'puma'
gem 'webpacker', '~> 5.x'
gem 'webpacker', '~> 5.4', '>= 5.4.3'
# 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'
@@ -70,9 +82,9 @@ gem 'wisper', '2.0.0'
##--- gems for channels ---##
# TODO: bump up gem to 2.0
gem 'facebook-messenger', '1.5.0'
gem 'telegram-bot-ruby'
gem 'twilio-ruby', '~> 5.32.0'
gem 'facebook-messenger'
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'
@@ -80,21 +92,29 @@ gem 'twitty'
gem 'koala'
# slack client
gem 'slack-ruby-client'
# for dialogflow integrations
gem 'google-cloud-dialogflow'
##--- gems for debugging and error reporting ---##
# static analysis
gem 'brakeman'
gem 'scout_apm'
gem 'sentry-raven'
##-- apm and error monitoring ---#
# loaded only when environment variables are set.
# ref application.rb
gem 'ddtrace', require: false
gem 'elastic-apm', require: false
gem 'newrelic_rpm', require: false
gem 'newrelic-sidekiq-metrics', require: false
gem 'scout_apm', require: false
gem 'sentry-rails', require: false
gem 'sentry-ruby', require: false
gem 'sentry-sidekiq', require: false
##-- background job processing --##
gem 'sidekiq'
gem 'sidekiq', '~> 6.4.2'
# We want cron jobs
gem 'sidekiq-cron'
gem 'sidekiq-cron', '~> 1.6', '>= 1.6.0'
##-- Push notification service --##
gem 'fcm'
gem 'webpush'
gem 'web-push'
##-- geocoding / parse location from ip --##
# http://www.rubygeocoder.com/
@@ -105,6 +125,35 @@ 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'
## - helper gems --##
## to populate db with sample data
gem 'faker'
# Can remove this in rails 7
gem 'net-imap', require: false
gem 'net-pop', require: false
gem 'net-smtp', require: false
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'
@@ -112,39 +161,58 @@ 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'
# profiling
gem 'rack-mini-profiler', require: false
gem 'stackprof'
end
group :test do
# Cypress in rails.
gem 'cypress-on-rails', '~> 1.0'
gem 'cypress-on-rails', '~> 1.13', '>= 1.13.1'
# fast cleaning of database
gem 'database_cleaner'
# mock http calls
gem 'webmock'
# test profiling
gem 'test-prof'
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_junit_formatter'
gem 'rspec-rails', '~> 5.0.3'
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
# worked with microsoft refresh token
gem 'omniauth-oauth2'
gem 'audited', '~> 5.2'
# need for google auth
gem 'omniauth'
gem 'omniauth-google-oauth2'
gem 'omniauth-rails_csrf_protection', '~> 1.0'
+591 -377
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -1,7 +1,11 @@
The MIT License (MIT)
Copyright (c) 2017-2021 Chatwoot 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
in the Software without restriction, including without limitation the rights
+3 -3
View File
@@ -1,3 +1,3 @@
release: bundle exec rails db:chatwoot_prepare
web: bin/rails server -p $PORT -e $RAILS_ENV
worker: bundle exec sidekiq -C config/sidekiq.yml
release: POSTGRES_STATEMENT_TIMEOUT=600s bundle exec rails db:chatwoot_prepare
web: bundle exec rails ip_lookup:setup && bin/rails server -p $PORT -e $RAILS_ENV
worker: bundle exec rails ip_lookup:setup && bundle exec sidekiq -C config/sidekiq.yml
+2 -1
View File
@@ -1,3 +1,4 @@
backend: bin/rails s -p 3000
frontend: bin/webpack-dev-server
worker: bundle exec sidekiq -C config/sidekiq.yml
# https://github.com/mperham/sidekiq/issues/3090#issuecomment-389748695
worker: dotenv bundle exec sidekiq -C config/sidekiq.yml
+1 -1
View File
@@ -1,3 +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
worker: dotenv RAILS_ENV=test bundle exec sidekiq -C config/sidekiq.yml
+58 -37
View File
@@ -1,83 +1,87 @@
<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>
___
<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>
<a href="https://codeclimate.com/github/chatwoot/chatwoot/maintainability"><img src="https://api.codeclimate.com/v1/badges/e6e3f66332c91e5a4c0c/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>
<img src="https://s3.us-west-2.amazonaws.com/gh-assets.chatwoot.com/chatwoot-dashboard-assets.png" width="100%" alt="Chat dashboard"/>
<img src="https://chatwoot-public-assets.s3.amazonaws.com/github/screenshot.png" width="100%" alt="Chat dashboard"/>
Chatwoot is an open-source omnichannel customer support software. The development of Chatwoot started in 2016. It failed to succeed as a business and eventually shut up shop in 2017. During 2019 #Hacktoberfest, the maintainers decided to make it open-source, 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 this time, we are building it in the open. Thanks to the ideas and contributions from the community.
---
### Features
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.
Chatwoot gives an integrated view of conversations happening in different communication channels.
## Features
It supports the following conversation channels:
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.
- **Whatsapp**: Connect your Whatsapp business account and manage the conversation in Chatwoot
- **SMS**: Connect your Twilio SMS account and reply to the SMS queries in Chatwoot
- **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 (beta)**: Forward all your email queries to Chatwoot and view it in our integrated dashboard.
- **Email**: Forward all your email queries to Chatwoot and view it in our integrated dashboard.
And more.
Other features include:
- **Multi-brand inboxes**: Manage multiple brands or pages using a single dashboard.
- **Private notes**: Inter team communication is possible using private notes in a conversation.
- **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 labelling to create custom workflows.
- **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 would send an email to the customer under the agent name so that the user can continue the conversation over the email.
- **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
### Documentation
Detailed documentation is available at [chatwoot.com/help-center](https://www.chatwoot.com/help-center).
Detailed documentation is available at [www.chatwoot.com/help-center](https://www.chatwoot.com/help-center).
### Translation process
## 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
## Branching model
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`.
---
## Deployment
### Deployment
#### Heroku one-click deploy
### Heroku one-click deploy
Deploying Chatwoot to Heroku is a breeze. It's as simple as clicking this button:
@@ -85,17 +89,34 @@ Deploying Chatwoot to Heroku is a breeze. It's as simple as clicking this button
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.
#### Other deployment options
Please follow [deployment architecture guide](https://www.chatwoot.com/docs/deployment/architecture) to deploy with Docker or Caprover.
### DigitalOcean 1-Click Kubernetes deployment
---
Chatwoot now supports 1-Click deployment to DigitalOcean as a kubernetes app.
### Contributors ✨
<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.
## Contributors ✨
Thanks goes to all these [wonderful people](https://www.chatwoot.com/docs/contributors):
<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-2021, Chatwoot Inc - Released under the MIT License.
*Chatwoot* &copy; 2017-2023, Chatwoot Inc - Released under the MIT License.
+56
View File
@@ -0,0 +1,56 @@
Chatwoot is looking forward to working with security researchers worldwide 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, contact security@chatwoot.com.
Please try your best to describe a clear and realistic impact for your report, and please don't open any public issues on GitHub or social media; we're doing our best to respond through Huntr as quickly as possible.
> Note: Please use the email for questions related to the process. Disclosures should be done via [huntr.dev](https://huntr.dev/)
## Supported versions
| Version | Supported |
| ------- | -------------- |
| latest | ️✅ |
| <latest | ❌ |
## Vulnerabilities we care about 🫣
> Note: Please do not perform testing against Chatwoot production services. Use a `self-hosted instance` to perform tests.
- Remote command execution
- SQL Injection
- Authentication bypass
- Privilege Escalation
- Cross-site scripting (XSS)
- Performing limited admin actions without authorization
- CSRF
You can learn more about our triaging process [here](https://www.chatwoot.com/docs/contributing-guide/security-reports).
## Non-Qualifying Vulnerabilities
We consider the following out of scope, though there may be exceptions.
- Missing HTTP security headers
- Incomplete/Missing SPF/DKIM
- Reports from automated tools or scanners
- Theoretical attacks without proof of exploitability
- Social engineering
- Reflected file download
- Physical attacks
- Weak SSL/TLS/SSH algorithms or protocols
- Attacks involving physical access to a user's device or a device or network that's already seriously compromised (e.g., man-in-the-middle).
- The user attacks themselves
- Incomplete/Missing SPF/DKIM
- Denial of Service attacks
- Brute force attacks
- DNSSEC
If you are unsure about the scope, please create a [report](https://huntr.dev/repos/chatwoot/chatwoot/).
## Thanks
Thank you for keeping Chatwoot and our users safe. 🙇
+1
View File
@@ -0,0 +1 @@
2.2.0
+1
View File
@@ -0,0 +1 @@
2.1.0
+20 -3
View File
@@ -28,20 +28,37 @@
"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"
"size": "basic"
},
"worker": {
"quantity": 1,
"size": "FREE"
"size": "basic"
}
},
"stack": "heroku-20",
"image": "heroku/ruby",
"addons": [ "heroku-redis", "heroku-postgresql"],
"addons": [
{
"plan": "heroku-redis:mini"
},
{
"plan": "heroku-postgresql:mini"
}
],
"stack": "heroku-20",
"buildpacks": [
{
"url": "heroku/ruby"
+93 -10
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,33 +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
custom_attributes = params[:custom_attributes] ? @contact.custom_attributes.merge(params[:custom_attributes]) : @contact.custom_attributes
@contact.update!(params.slice(:name, :email, :identifier).merge({ custom_attributes: custom_attributes }))
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
View File
@@ -2,3 +2,4 @@
//= link administrate/application.css
//= link administrate/application.js
//= link dashboardChart.js
//= link secretField.js
+34
View File
@@ -0,0 +1,34 @@
// eslint-disable-next-line
function toggleSecretField(e) {
e.preventDefault();
e.stopPropagation();
const toggler = e.currentTarget;
const secretField = toggler.parentElement;
const textElement = secretField.querySelector('[data-secret-masked]');
if (!textElement) return;
if (textElement.dataset.secretMasked === 'false') {
textElement.textContent = '•'.repeat(10);
textElement.dataset.secretMasked = 'true';
toggler.querySelector('svg use').setAttribute('xlink:href', '#eye-show');
return;
}
textElement.textContent = secretField.dataset.secretText;
textElement.dataset.secretMasked = 'false';
toggler.querySelector('svg use').setAttribute('xlink:href', '#eye-hide');
}
// eslint-disable-next-line
function copySecretField(e) {
e.preventDefault();
e.stopPropagation();
const toggler = e.currentTarget;
const secretField = toggler.parentElement;
navigator.clipboard.writeText(secretField.dataset.secretText);
}
@@ -6,7 +6,6 @@
@import 'utilities/text-color';
@import 'selectize';
@import 'datetime_picker';
@import 'library/clearfix';
@import 'library/data-label';
@@ -43,3 +43,20 @@
.cell-label--number {
text-align: right;
}
.cell-data__secret-field {
align-items: center;
display: flex;
span {
flex: 1;
}
button {
margin-left: 5px;
svg {
fill: currentColor;
}
}
}
@@ -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;
-28
View File
@@ -1,28 +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
Bot.on :message_echo do |message|
Rails.logger.info "MESSAGE_ECHO #{message}"
response = ::Integrations::Facebook::MessageParser.new(message)
::Integrations::Facebook::MessageCreator.new(response).perform
end
end
+4 -5
View File
@@ -2,7 +2,7 @@
class AccountBuilder
include CustomExceptions::Account
pattr_initialize [:account_name!, :email!, :confirmed!, :user, :user_full_name, :user_password]
pattr_initialize [:account_name!, :email!, :confirmed, :user, :user_full_name, :user_password, :super_admin, :locale]
def perform
if @user.nil?
@@ -61,12 +61,11 @@ class AccountBuilder
end
def create_user
password = user_password || SecureRandom.alphanumeric(12)
@user = User.new(email: @email,
password: password,
password_confirmation: password,
password: user_password,
password_confirmation: user_password,
name: @user_full_name)
@user.type = 'SuperAdmin' if @super_admin
@user.confirm if @confirmed
@user.save!
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
-59
View File
@@ -1,59 +0,0 @@
class ContactBuilder
pattr_initialize [:source_id!, :inbox!, :contact_attributes!]
def perform
contact_inbox = inbox.contact_inboxes.find_by(source_id: source_id)
return contact_inbox if contact_inbox
build_contact_inbox
end
private
def account
@account ||= inbox.account
end
def create_contact_inbox(contact)
::ContactInbox.create!(
contact_id: contact.id,
inbox_id: inbox.id,
source_id: source_id
)
end
def update_contact_avatar(contact)
::ContactAvatarJob.perform_later(contact, contact_attributes[:avatar_url]) if contact_attributes[:avatar_url]
end
def create_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]
)
end
def find_contact
contact = nil
contact = account.contacts.find_by(identifier: contact_attributes[:identifier]) if contact_attributes[:identifier].present?
contact ||= account.contacts.find_by(email: contact_attributes[:email]) if contact_attributes[:email].present?
contact
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
end
end
end
+68
View File
@@ -0,0 +1,68 @@
# This Builder will create a contact inbox with specified attributes. If the contact inbox already exists, it will be returned.
# For Specific Channels like whatsapp, email etc . it smartly generated appropriate the source id when none is provided.
class ContactInboxBuilder
pattr_initialize [:contact, :inbox, :source_id, { hmac_verified: false }]
def perform
@source_id ||= generate_source_id
create_contact_inbox 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'
email_source_id
when 'Channel::Sms'
phone_source_id
when 'Channel::Api', 'Channel::WebWidget'
SecureRandom.uuid
else
raise "Unsupported operation for this channel: #{@inbox.channel_type}"
end
end
def email_source_id
raise ActionController::ParameterMissing, 'contact email' unless @contact.email
@contact.email
end
def phone_source_id
raise ActionController::ParameterMissing, 'contact phone number' unless @contact.phone_number
@contact.phone_number
end
def wa_source_id
raise ActionController::ParameterMissing, 'contact phone number' unless @contact.phone_number
# whatsapp doesn't want the + in e164 format
@contact.phone_number.delete('+').to_s
end
def twilio_source_id
raise ActionController::ParameterMissing, 'contact phone number' 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
::ContactInbox.create_with(hmac_verified: hmac_verified || false).find_or_create_by!(
contact_id: @contact.id,
inbox_id: @inbox.id,
source_id: @source_id
)
end
end
@@ -0,0 +1,86 @@
# This Builder will create a contact and contact inbox with specified attributes.
# If an existing identified contact exisits, it will be returned.
# for contact inbox logic it uses the contact inbox builder
class ContactInboxWithContactBuilder
pattr_initialize [:inbox!, :contact_attributes!, :source_id, :hmac_verified]
def perform
find_or_create_contact_and_contact_inbox
# in case of race conditions where contact is created by another thread
# we will try to find the contact and create a contact inbox
rescue ActiveRecord::RecordNotUnique
find_or_create_contact_and_contact_inbox
end
def find_or_create_contact_and_contact_inbox
@contact_inbox = inbox.contact_inboxes.find_by(source_id: source_id) if source_id.present?
return @contact_inbox if @contact_inbox
ActiveRecord::Base.transaction(requires_new: true) do
build_contact_with_contact_inbox
update_contact_avatar(@contact) unless @contact.avatar.attached?
@contact_inbox
end
end
private
def build_contact_with_contact_inbox
@contact = find_contact || create_contact
@contact_inbox = create_contact_inbox
end
def account
@account ||= inbox.account
end
def create_contact_inbox
ContactInboxBuilder.new(
contact: @contact,
inbox: @inbox,
source_id: @source_id,
hmac_verified: hmac_verified
).perform
end
def update_contact_avatar(contact)
::Avatar::AvatarFromUrlJob.perform_later(contact, contact_attributes[:avatar_url]) if contact_attributes[:avatar_url]
end
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
end
+40
View File
@@ -0,0 +1,40 @@
class ConversationBuilder
pattr_initialize [:params!, :contact_inbox!]
def perform
look_up_exising_conversation || create_new_conversation
end
private
def look_up_exising_conversation
return unless @contact_inbox.inbox.lock_to_single_conversation?
@contact_inbox.conversations.last
end
def create_new_conversation
::Conversation.create!(conversation_params)
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
# commenting this out to see if there are any errors, if not we can remove this in subsequent releases
# status = { status: 'pending' } if status[:status] == 'bot'
{
account_id: @contact_inbox.inbox.account_id,
inbox_id: @contact_inbox.inbox_id,
contact_id: @contact_inbox.contact_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
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
@@ -4,55 +4,50 @@
# 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
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_contact_inbox
build_message
end
rescue Koala::Facebook::AuthenticationError
@inbox.channel.authorization_error!
rescue StandardError => e
Raven.capture_exception(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))
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)
def build_contact_inbox
@contact_inbox = ::ContactInboxWithContactBuilder.new(
source_id: @sender_id,
inbox: @inbox,
contact_attributes: contact_params
).perform
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]
end
end
def attach_file(attachment, file_url)
file_resource = LocalResource.new(file_url)
attachment.file.attach(io: file_resource.file, filename: file_resource.filename, content_type: file_resource.encoding)
rescue *ExceptionList::URI_EXCEPTIONS => e
Rails.logger.info "invalid url #{file_url} : #{e.message}"
@attachments.each do |attachment|
process_attachment(attachment)
end
end
def conversation
@@ -60,34 +55,11 @@ class Messages::Facebook::MessageBuilder
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))
end
params
end
def file_type_params(attachment)
{
external_url: attachment['payload']['url'],
remote_file_url: attachment['payload']['url']
}
end
def location_params(attachment)
lat = attachment['payload']['coordinates']['lat']
long = attachment['payload']['coordinates']['long']
@@ -110,7 +82,7 @@ class Messages::Facebook::MessageBuilder
{
account_id: @inbox.account_id,
inbox_id: @inbox.id,
contact_id: contact.id
contact_id: @contact_inbox.contact_id
}
end
@@ -121,7 +93,15 @@ class Messages::Facebook::MessageBuilder
message_type: @message_type,
content: response.content,
source_id: response.identifier,
sender: @outgoing_echo ? nil : contact
sender: @outgoing_echo ? nil : @contact_inbox.contact
}
end
def process_contact_params_result(result)
{
name: "#{result['first_name'] || 'John'} #{result['last_name'] || 'Doe'}",
account_id: @inbox.account_id,
avatar_url: result['profile_pic']
}
end
@@ -129,14 +109,22 @@ class Messages::Facebook::MessageBuilder
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
if e.message.include?('2018218')
Rails.logger.warn e
else
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception unless @outgoing_echo
end
rescue StandardError => e
result = {}
Raven.capture_exception(e)
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception
end
{
name: "#{result['first_name'] || 'John'} #{result['last_name'] || 'Doe'}",
account_id: @inbox.account_id,
remote_avatar_url: result['profile_pic'] || ''
}
process_contact_params_result(result)
end
end
@@ -0,0 +1,153 @@
# 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?
return if message_content.blank? && all_unsupported_files?
@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
def all_unsupported_files?
return if attachments.empty?
attachments_type = attachments.pluck(:type).uniq.first
unsupported_file_type?(attachments_type)
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
+72 -13
View File
@@ -8,28 +8,65 @@ class Messages::MessageBuilder
@conversation = conversation
@user = user
@message_type = params[:message_type] || 'outgoing'
@items = params.to_unsafe_h&.dig(:content_attributes, :items)
@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
@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
process_attachments
process_emails
@message.save!
@message
end
private
def process_attachments
return if @attachments.blank?
@attachments.each do |uploaded_attachment|
attachment = @message.attachments.build(
account_id: @message.account_id,
file: uploaded_attachment
)
attachment.file_type = if uploaded_attachment.is_a?(String)
file_type_by_signed_id(
uploaded_attachment
)
else
file_type(uploaded_attachment&.content_type)
end
end
end
def process_emails
return unless @conversation.inbox&.inbox_type == 'Email'
cc_emails = []
cc_emails = @params[:cc_emails].split(',') if @params[:cc_emails].present?
bcc_emails = []
bcc_emails = @params[:bcc_emails].split(',') if @params[:bcc_emails].present?
all_email_addresses = cc_emails + bcc_emails
validate_email_addresses(all_email_addresses)
@message.content_attributes[:cc_emails] = cc_emails
@message.content_attributes[:bcc_emails] = bcc_emails
end
def validate_email_addresses(all_emails)
all_emails&.each do |email|
raise StandardError, 'Invalid email address' unless email.match?(URI::MailTo::EMAIL_REGEXP)
end
end
def message_type
if @conversation.inbox.channel_type != 'Channel::Api' && @message_type == 'incoming'
raise StandardError, 'Incoming messages are only allowed in Api inboxes'
@@ -39,7 +76,29 @@ class Messages::MessageBuilder
end
def sender
message_type == 'outgoing' ? @user : @conversation.contact
message_type == 'outgoing' ? (message_sender || @user) : @conversation.contact
end
def external_created_at
@params[:external_created_at].present? ? { external_created_at: @params[:external_created_at] } : {}
end
def automation_rule_id
@automation_rule.present? ? { content_attributes: { automation_rule_id: @automation_rule } } : {}
end
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
@@ -54,6 +113,6 @@ class Messages::MessageBuilder
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,93 @@
class Messages::Messenger::MessageBuilder
include ::FileTypeHelper
def process_attachment(attachment)
# This check handles very rare case if there are multiple files to attach with only one usupported file
return if unsupported_file_type?(attachment['type'])
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 if @message.reload.attachments.blank?
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_attributes[:image_type] = 'story_mention'
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.attachments.destroy_all
@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
private
def unsupported_file_type?(attachment_type)
[:template, :unsupported_type].include? attachment_type.to_sym
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 hour],
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
+4
View File
@@ -16,4 +16,8 @@ class Api::BaseController < ApplicationController
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,19 +10,17 @@ 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!
delete_user_record(@agent)
head :ok
end
private
@@ -38,32 +37,46 @@ 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
return @user.send_confirmation_instructions if @user
@user = User.create!(new_agent_params.slice(:email, :name, :password, :password_confirmation))
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.order_by_full_name.includes({ avatar_attachment: [:blob] })
@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
def delete_user_record(agent)
DeleteObjectJob.perform_later(agent) if agent.reload.account_users.blank?
end
end
@@ -0,0 +1,71 @@
class Api::V1::Accounts::ArticlesController < Api::V1::Accounts::BaseController
before_action :portal
before_action :check_authorization
before_action :fetch_article, except: [:index, :create, :attach_file]
before_action :set_current_page, only: [:index]
def index
@portal_articles = @portal.articles
@all_articles = @portal_articles.search(list_params)
@articles_count = @all_articles.count
@articles = @all_articles.order_by_updated_at.page(@current_page)
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) if params[:article].present?
render json: { error: @article.errors.messages }, status: :unprocessable_entity and return unless @article.valid?
end
def destroy
@article.destroy!
head :ok
end
def attach_file
file_blob = ActiveStorage::Blob.create_and_upload!(
key: nil,
io: params[:background_image].tempfile,
filename: params[:background_image].original_filename,
content_type: params[:background_image].content_type
)
file_blob.save!
render json: { file_url: url_for(file_blob) }
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, :slug, :position, :content, :description, :position, :category_id, :author_id, :associated_article_id, :status, meta: [:title,
:description,
{ tags: [] }]
)
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,32 +1,6 @@
class Api::V1::Accounts::BaseController < Api::BaseController
include SwitchLocale
include EnsureCurrentAccountHelper
before_action :current_account
around_action :switch_locale_using_account_locale
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
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
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?
@@ -45,8 +55,13 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
def update_fb_page(fb_page_id, access_token)
fb_page = get_fb_page(fb_page_id)
fb_page&.update!(user_access_token: @user_access_token, page_access_token: access_token)
fb_page&.reauthorized!
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,49 +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)
rescue *ExceptionList::URI_EXCEPTIONS => e
Rails.logger.info "invalid url #{file_url} : #{e.message}"
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,10 @@ 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]}%")
.order_by_search(params[:search])
else
Current.account.canned_responses
end
@@ -0,0 +1,58 @@
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
@current_locale = params[:locale]
@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,10 +40,11 @@ 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
)
@inbox = Current.account.inboxes.create(
@inbox = Current.account.inboxes.create!(
name: permitted_params[:name],
channel: @twilio_channel
)
@@ -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
@@ -1,19 +1,18 @@
class Api::V1::Accounts::Contacts::ContactInboxesController < Api::V1::Accounts::BaseController
before_action :ensure_contact
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)
@contact_inbox = ContactInboxBuilder.new(
contact: @contact,
inbox: @inbox,
source_id: params[:source_id]
).perform
end
private
def ensure_inbox
@inbox = Current.account.inboxes.find(params[:inbox_id])
end
def ensure_contact
@contact = Current.account.contacts.find(params[:contact_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, :taggings
).where(inbox_id: inbox_ids, contact_id: permitted_params[:contact_id])
).where(inbox_id: inbox_ids, contact_id: @contact.id).order(id: :desc).limit(20)
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
@@ -1,13 +1,13 @@
class Api::V1::Accounts::Contacts::LabelsController < Api::V1::Accounts::BaseController
class Api::V1::Accounts::Contacts::LabelsController < Api::V1::Accounts::Contacts::BaseController
include LabelConcern
private
def model
@model ||= Current.account.contacts.find(permitted_params[:contact_id])
@model ||= @contact
end
def permitted_params
params.permit(:contact_id, labels: [])
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,32 +1,44 @@
class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
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
protect_from_forgery with: :null_session
before_action :check_authorization
before_action :set_current_page, only: [:index, :active, :search]
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_count = resolved_contacts.count
@contacts = fetch_contact_last_seen_at(resolved_contacts)
@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',
search: "%#{params[:q]}%"
'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_contact_last_seen_at(contacts)
@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
@@ -40,69 +52,128 @@ class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
def show; end
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!
end
def create
ActiveRecord::Base.transaction do
@contact = Current.account.contacts.new(contact_params)
@contact = Current.account.contacts.new(permitted_params.except(:avatar_url))
@contact.save!
@contact_inbox = build_contact_inbox
process_avatar
end
end
def update
@contact.assign_attributes(contact_update_params)
@contact.save!
rescue ActiveRecord::RecordInvalid => e
render json: {
message: e.record.errors.full_messages.join(', '),
contact: Current.account.contacts.find_by(email: contact_params[:email])
}, status: :unprocessable_entity
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
# TODO: Move this to a finder class
def resolved_contacts
@resolved_contacts ||= Current.account.contacts
.where.not(email: [nil, ''])
.or(Current.account.contacts.where.not(phone_number: [nil, '']))
.order('LOWER(name)')
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 set_current_page
@current_page = params[:page] || 1
end
def fetch_contact_last_seen_at(contacts)
contacts.left_outer_joins(:conversations)
.select('contacts.*, COUNT(conversations.id) as conversations_count, MAX(conversations.contact_last_seen_at) as last_seen_at')
.group('contacts.id')
.includes([{ avatar_attachment: [:blob] }, { contact_inboxes: [:inbox] }])
.page(@current_page).per(RESULTS_PER_PAGE)
def fetch_contacts_with_conversation_count(contacts)
conversation_count_sub_query = 'SELECT COUNT(*) FROM "conversations" WHERE "conversations"."contact_id" = "contacts"."id"'
contacts_with_conversation_count = filtrate(contacts)
.select("contacts.*, (#{conversation_count_sub_query}) 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)
ContactInboxBuilder.new(
contact: @contact,
inbox: inbox,
source_id: params[:source_id]
).perform
end
def contact_params
params.require(:contact).permit(:name, :email, :phone_number, additional_attributes: {}, custom_attributes: {})
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(contact_params[:custom_attributes]) if contact_params[: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
contact_params.except(:custom_attributes).merge({ custom_attributes: contact_custom_attributes })
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.includes(contact_inboxes: [:inbox]).find(params[:id])
end
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,20 +1,34 @@
class Api::V1::Accounts::Conversations::AssignmentsController < Api::V1::Accounts::Conversations::BaseController
# assigns agent/team to a conversation
def create
set_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_assignee
# if params[:assignee_id] is not a valid id, it will set to nil, hence unassigning the conversation
if params.key?(:assignee_id)
@assignee = Current.account.users.find_by(id: params[:assignee_id])
@conversation.update_assignee(@assignee)
elsif params.key?(:team_id)
@assignee = Current.account.teams.find_by(id: params[:team_id])
@conversation.update!(team: @assignee)
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
@@ -4,7 +4,7 @@ class Api::V1::Accounts::Conversations::MessagesController < Api::V1::Accounts::
end
def create
user = current_user || @resource
user = Current.user || @resource
mb = Messages::MessageBuilder.new(user, @conversation, params)
@message = mb.perform
rescue StandardError => e
@@ -13,11 +13,29 @@ class Api::V1::Accounts::Conversations::MessagesController < Api::V1::Accounts::
def destroy
ActiveRecord::Base.transaction do
message.update!(content: I18n.t('conversations.messages.deleted'), deleted: true)
message.update!(content: I18n.t('conversations.messages.deleted'), content_attributes: { deleted: true })
message.attachments.destroy_all
end
end
def translate
return head :ok if already_translated_content_available?
translated_content = Integrations::GoogleTranslate::ProcessorService.new(
message: message,
target_language: permitted_params[:target_language]
).perform
if translated_content.present?
translations = {}
translations[permitted_params[:target_language]] = translated_content
translations = message.translations.merge!(translations) if message.translations.present?
message.update!(translations: translations)
end
render json: { content: translated_content }
end
private
def message
@@ -29,6 +47,10 @@ class Api::V1::Accounts::Conversations::MessagesController < Api::V1::Accounts::
end
def permitted_params
params.permit(:id)
params.permit(:id, :target_language)
end
def already_translated_content_available?
message.translations.present? && message.translations[permitted_params[:target_language]].present?
end
end
@@ -0,0 +1,41 @@
class Api::V1::Accounts::Conversations::ParticipantsController < Api::V1::Accounts::Conversations::BaseController
def show
@participants = @conversation.conversation_participants
end
def create
ActiveRecord::Base.transaction do
@participants = participants_to_be_added_ids.map { |user_id| @conversation.conversation_participants.find_or_create_by(user_id: user_id) }
end
end
def update
ActiveRecord::Base.transaction do
participants_to_be_added_ids.each { |user_id| @conversation.conversation_participants.find_or_create_by(user_id: user_id) }
participants_to_be_removed_ids.each { |user_id| @conversation.conversation_participants.find_by(user_id: user_id)&.destroy }
end
@participants = @conversation.conversation_participants
render action: 'show'
end
def destroy
ActiveRecord::Base.transaction do
params[:user_ids].map { |user_id| @conversation.conversation_participants.find_by(user_id: user_id)&.destroy }
end
head :ok
end
private
def participants_to_be_added_ids
params[:user_ids] - current_participant_ids
end
def participants_to_be_removed_ids
current_participant_ids - params[:user_ids]
end
def current_participant_ids
@current_participant_ids ||= @conversation.conversation_participants.pluck(:user_id)
end
end
@@ -1,8 +1,9 @@
class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseController
include Events::Types
include DateRangeHelper
before_action :conversation, except: [:index]
before_action :contact_inbox, only: [:create]
before_action :conversation, except: [:index, :meta, :search, :create, :filter]
before_action :inbox, :contact, :contact_inbox, only: [:create]
def index
result = conversation_finder.perform
@@ -22,11 +23,20 @@ class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseContro
end
def create
@conversation = ::Conversation.create!(conversation_params)
ActiveRecord::Base.transaction do
@conversation = ConversationBuilder.new(params: params, contact_inbox: @contact_inbox).perform
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
@@ -38,60 +48,119 @@ class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseContro
end
def transcript
ConversationReplyMailer.conversation_transcript(@conversation, params[:email])&.deliver_later if params[:email].present?
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
case params[:typing_status]
when 'on'
trigger_typing_event(CONVERSATION_TYPING_ON)
trigger_typing_event(CONVERSATION_TYPING_ON, params[:is_private])
when 'off'
trigger_typing_event(CONVERSATION_TYPING_OFF)
trigger_typing_event(CONVERSATION_TYPING_OFF, params[:is_private])
end
head :ok
end
def update_last_seen
@conversation.agent_last_seen_at = DateTime.now.utc
update_last_seen_on_conversation(DateTime.now.utc, assignee?)
end
def unread
last_incoming_message = @conversation.messages.incoming.last
last_seen_at = last_incoming_message.created_at - 1.second if last_incoming_message.present?
update_last_seen_on_conversation(last_seen_at, true)
end
def custom_attributes
@conversation.custom_attributes = params.permit(custom_attributes: {})[:custom_attributes]
@conversation.save!
end
private
def trigger_typing_event(event)
def update_last_seen_on_conversation(last_seen_at, update_assignee)
# rubocop:disable Rails/SkipsModelValidations
@conversation.update_column(:agent_last_seen_at, last_seen_at)
@conversation.update_column(:assignee_last_seen_at, last_seen_at) if update_assignee.present?
# rubocop:enable Rails/SkipsModelValidations
end
def set_conversation_status
# TODO: temporary fallback for the old bot status in conversation, we will remove after couple of releases
# commenting this out to see if there are any errors, if not we can remove this in subsequent releases
# status = params[:status] == 'bot' ? 'pending' : params[:status]
@conversation.status = params[:status]
@conversation.snoozed_until = parse_date_time(params[:snoozed_until].to_s) if params[:snoozed_until]
end
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)
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 inbox
return if params[:inbox_id].blank?
@inbox = Current.account.inboxes.find(params[:inbox_id])
authorize @inbox, :show?
end
def contact
return if params[:contact_id].blank?
@contact = Current.account.contacts.find(params[:contact_id])
end
def contact_inbox
@contact_inbox = build_contact_inbox
# fallback for the old case where we do look up only using source id
# In future we need to change this and make sure we do look up on combination of inbox_id and source_id
# and deprecate the support of passing only source_id as the param
@contact_inbox ||= ::ContactInbox.find_by!(source_id: params[:source_id])
authorize @contact_inbox.inbox, :show?
rescue ActiveRecord::RecordNotUnique
render json: { error: 'source_id should be unique' }, status: :unprocessable_entity
end
def conversation_params
{
account_id: Current.account.id,
inbox_id: @contact_inbox.inbox_id,
contact_id: @contact_inbox.contact_id,
contact_inbox_id: @contact_inbox.id,
additional_attributes: params[:additional_attributes]
}
def build_contact_inbox
return if @inbox.blank? || @contact.blank?
ContactInboxBuilder.new(
contact: @contact,
inbox: @inbox,
source_id: params[:source_id]
).perform
end
def conversation_finder
@conversation_finder ||= ConversationFinder.new(current_user, params)
@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', formats: [: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,22 +1,40 @@
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.select(: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

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