Commit Graph

88 Commits

Author SHA1 Message Date
Sojan Jose
7776b74126 chore: Apply fixes for items in rubocop_todo [CW-1806] (#8864)
This PR addresses several items listed in our rubocop_todo by implementing the necessary corrections and enhancements. As a result, we are now able to remove the rubocop_todo file entirely, streamlining our codebase and ensuring adherence to our coding standards.

fixes: https://linear.app/chatwoot/issue/CW-1806/chore-rubocop-audit
2024-02-07 13:36:04 +04:00
Pranav Raj S
8c9a351c84 feat: Add support for ascending and descending options in sort (#8542) 2023-12-12 17:15:48 -08:00
Pranav Raj S
d28f512de4 fix: Update the label name to use .strip to avoid unnecessary whitespace characters (#8541)
- The cache stores the labels as label1, label2. Without removing the whitespace, the output of cached_label_list_array would be [label1, [whitespace]label2], which doesn't match with the existing labels. This list is returned with proper label names.
2023-12-12 15:04:29 -08:00
Sojan Jose
8c67ea56e7 chore: Campaign conversations should be created in open state (#8209)
- Ensure that conversations originating from campaigns are created in the open state.
2023-10-25 13:03:08 -07:00
Shivam Mishra
9018ec9678 test: reset Current.user after spec (#8123) 2023-10-17 18:06:54 +05:30
Pranav Raj S
4baa4363f4 fix: Update unread_count being 0 if agent has not seen the conversation (#7690) 2023-08-07 18:50:31 -07:00
Pranav Raj S
93daaea19b feat: Add a sort option for conversations waiting for a reply from an agent (#7364) 2023-06-21 13:20:39 -07:00
Sojan Jose
595e6e79f0 chore: Add sla policy association to conversation (#7360)
Adds the sla policy association to the conversation

Fixes: https://linear.app/chatwoot/issue/CW-1615/applying-an-sla-to-the-conversation
2023-06-21 14:48:50 +05:30
Sojan Jose
7ab7bac6bf chore: Enable the new Rubocop rules (#7122)
fixes: https://linear.app/chatwoot/issue/CW-1574/renable-the-disabled-rubocop-rules
2023-05-19 14:37:10 +05:30
Shivam Mishra
d95283f5c2 feat: improvements to priority (#6981)
* fix: colors for urgent icon

* feat: trigger updated event on priority change

* fix: specs
2023-04-25 22:28:19 +05:30
Shivam Mishra
0bbb28c432 feat: sort conversation on priority (#6943)
* feat: update seed script to include prioritt

* feat: add sort_handler for conversations

* test: sort on priority order

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-04-25 09:47:47 +05:30
Shivam Mishra
a34729c153 feat: add activity message for priority change (#6933)
* feat: add priority const

* feat: add toggle priority method

* feat: update controller route and specs

* refactor: status change method

* refactor: abstract label change and mute activity

* feat: add priority change_activity

* fix: interpolation for previous_changes

* refactor: reduce cognitive complexity of priority_change_activity

* refactor: move priority activity message handler to a separate module

* refactor: move typing logic to a service

* refactor: tests to reduce complexity

* fix: typo

* fix: constants

* fix: priority conditions

* fix: add a response

* fix: argument destructuring in I18n.t

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-04-20 16:41:53 +05:30
Tejaswini Chile
6a0ca35de4 Feat: detect language of the message content (#6660) 2023-04-04 08:57:27 +05:30
Pranav Raj S
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 S
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
Nithin David Thomas
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
Fayaz Ahmed
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
Tejaswini Chile
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
Jordan Brough
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
Sojan Jose
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
Tejaswini Chile
2397326324 fix: Auto populate team after assigned via API (#5250) 2022-08-12 13:40:28 +05:30
Sojan Jose
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
Sojan Jose
4187428729 chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
Tejaswini Chile
b86638faac fix: last incoming message sort (#4972) 2022-07-06 00:37:43 +05:30
Tejaswini Chile
ffd102cdfe Feat: custom sort (#4864) 2022-06-22 11:04:42 +05:30
Pranav Raj S
1bb0371c1d feat: Add agent_reply_time_window in API channels (#4857) 2022-06-14 18:05:37 +05:30
Tejaswini Chile
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
Tejaswini Chile
1ccd29140d Feat: send fb message outside of standard messaging window (#4439) 2022-04-19 12:21:20 +05:30
Tejaswini Chile
923b4637db chore: Automation bug fix (#4442) 2022-04-12 20:23:34 +05:30
Muhsin Keloth
24b20c10ce fix: Referer URL validation (#4309)
Fixes #354
2022-03-30 14:36:22 +05:30
Tejaswini Chile
bfe6324d9a chore: Webhook event data improvements (#4317) 2022-03-30 11:37:36 +05:30
Tejaswini Chile
60a0709de6 Fix: added validation for custom and additional attribute (#4260) 2022-03-24 15:38:28 +05:30
Jordan Brough
c2647a1f27 chore: Use "destroy!" instead of "destroy" when not checking the return value (#4259) 2022-03-24 13:28:25 +05:30
Sojan Jose
4ca66c1195 fix: Automation loop on conversation_update (#4071) 2022-02-25 18:01:21 +05:30
Muhsin Keloth
903072ef14 chore: Add custom attributes in conversation webhook payload (#3839) 2022-02-03 10:05:56 +05:30
Sojan Jose
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
Shivam Chahar
a4ee8ee239 Chore: Improve conversation auto resolution (#3405)
Fixes: #1583
2021-11-27 09:26:18 +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 Jose
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
Shivam Chahar
fec4a29081 Feat: Include previous messages in mention/assign notifications email (#3385) 2021-11-17 18:05:53 +05:30
Muhsin Keloth
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 Jose
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
Sojan Jose
a4c87f2052 chore: Handle attachments in Whatsapp Channel (#3299)
send and receive attachments in 360Dialog WhatsApp channels
2021-11-11 13:03:48 +05:30
Pranav Raj S
57abdc4d5f feat: Display "Snoozed Until" time on conversation header (#3028) 2021-09-29 19:33:51 +05:30
Sojan Jose
2890339734 chore: Limit objects returned by conversation API (#2721) 2021-07-31 21:19:42 +05:30
Sojan Jose
d955d8e7dc feat: Ability to snooze conversations (#2682)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-07-23 15:24:07 +05:30
Sojan Jose
a7ca55c080 chore: Change the conversation bot status to pending (#2677)
fixes: #2649
2021-07-21 22:02:43 +05:30
Muhsin Keloth
ba547b3f60 chore: Delete related notifications if a conversation is deleted (#2592) 2021-07-12 12:28:16 +05:30
Sojan Jose
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
Sojan Jose
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