Commit Graph

211 Commits

Author SHA1 Message Date
Sojan Jose
022383d942 chore: Upgrade to Rails 7 (#6719)
fixes: #6736
2023-05-06 10:44:52 +05:30
Sojan Jose
3fa654f5c6 chore: Add Index for widget contact lookup (#6998)
- Adds an index to improve the contact lookup performance while calling setUser from widget
2023-04-26 19:22:16 +05:30
Tejaswini Chile
e3193dcabc feat: Link help center portal to an Inbox (#6903) 2023-04-24 12:49:52 +05:30
Shivam Mishra
9c0259da6b feat: add priority field to conversation (#6921) (#6927)
* feat: add priority

* feat: add indexes
2023-04-19 13:23:14 +05:30
Shivam Mishra
ca2506a941 feat: allow sorting of articles (#6833)
* feat: sort by position

* chore: whitespace change

* feat: add border bottom color to list item

* feat: allow dragging articles

* feat: add migration to reorder all articles

* feat: add onsort method

* feat: finish UI sorting

* feat: show 50 per page in articles list

* feat: add article sorting methods

* feat: patch up reorder action with the API

* refactor: better naming

* chore: add comments

* feat: attach position to article before create

* feat: move article to end if moved between categories

* chore: add comments

* chore: update version

* fix: don't change position if previous category was nil

* fix: condition to trigger update on category change

* refactor: store new_position

* refactor: use grid instead of table

* feat: add snug spacing

* feat: add grab-icon

* feat: add grab icon to list

* refactor: show draggable only for category page

* feat: add update_positions as a class method

---------

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-04-17 14:43:10 +05:30
Pranav Raj S
91dc7733b0 feat: Use inbox image as avatar for the bot (#6859) 2023-04-07 13:25:18 -07:00
Pranav Raj S
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
Jordan Brough
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 Brough
aa75666ad9 chore: Remove extra audit column (#6769)
- Drop unintentional "audits.integer" column
2023-03-29 12:24:14 +05:30
Shivam Mishra
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
Sojan Jose
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
Tejaswini Chile
8f4d4798c2 feat: Backend changes for article and categories ordering (#6655) 2023-03-13 17:39:07 +05:30
Shivam Mishra
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
Shivam Mishra
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
Vishnu Narayanan
d870b0815a feat: Audit log APIs (#6434)
- Adds the appropriate APIs for Audit Logs.

ref: #6015
2023-03-01 20:02:58 +05:30
Sojan Jose
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
Shivam Mishra
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
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
Shubham Kumar
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
Tejaswini Chile
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 S
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 Jose
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
Sojan Jose
e7f1a9ab4d chore: Enable Macros for all accounts (#5858)
- migrations to enable macros for all accounts
2022-11-16 00:33:09 +00:00
Tejaswini Chile
48373628a1 fix: Macros authorizations (#5779)
Macros policy update.

ref: #5730
2022-11-07 17:46:00 -08:00
Pranav Raj S
20b4a91122 chore: Add feature flags in the settings console (#5657) 2022-10-17 14:59:44 -07:00
Sojan Jose
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
Tejaswini Chile
57fcb79d71 fix: Article slug auto saves (#5524)
- Auto save article slug
2022-09-30 07:25:23 -07:00
Tejaswini Chile
c1c57fb2cd fix: Add slug to articles (#5500) 2022-09-27 12:27:18 -07:00
Sojan Jose
3b7cae19e6 chore: Enable help center for self-hosted accounts (#5458) 2022-09-19 19:39:41 -07:00
Sojan Jose
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
Vishnu Narayanan
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
Jordan Brough
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
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
Pranav Raj S
e0cebfaa1a chore: Allow super admin to suspend an account (#5174) 2022-08-03 11:40:03 +05:30
Tejaswini Chile
f6891aebbb fix: Set account default language in account API (#5086) 2022-07-26 22:42:20 +05:30
Tejaswini Chile
6a4c0a1578 feat: Execute macro actions, for the conversation (#5066) 2022-07-26 12:41:22 +05:30
Tejaswini Chile
5727928600 fix: help center clearing minor bugs (#5075) 2022-07-22 15:01:07 +05:30
Tejaswini Chile
0cee42a9f9 feat: Macros CRUD api (#5047) 2022-07-19 17:37:00 +05:30
Pranav Raj S
1dc7ce526e chore: Add ee helper, custom_attributes to account (#5058) 2022-07-19 00:33:06 +05:30
Sojan Jose
05db053f60 chore: fix schema error from PR merges (#5016) 2022-07-11 20:12:48 +02:00
Jordan Brough
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 Chile
fdf449dc87 Feat: Article public apis (#4955) 2022-07-08 17:24:38 +05:30
Tejaswini Chile
ae59d0a343 feat: CRUD operation for associated articles to current article (#4912) 2022-07-04 20:29:44 +05:30
Tejaswini Chile
df1bf112ea feat: Category API to handle linked categories and parent-sub categories (#4879) 2022-06-28 11:23:20 +05:30
Pranav Raj S
b7606e4dd2 feat: Add native support for CSML in agent_bot API (#4913) 2022-06-23 19:17:46 +05:30
Aswin Dev P.S
d5ddc9d76c chore: Fix SMTP sentry issue (#4883)
* Fix SMTP sentry issue
2022-06-22 14:09:04 -07:00
Sojan Jose
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 Chile
ae72757d23 feat: APIs for Articles (#4777)
Fixes: #4802
2022-06-13 15:56:49 +05:30
Pranav Raj S
3f3ee6c34a chore: Add support for message_templates in API inbox (#4835) 2022-06-10 18:40:29 +05:30
Pranav Raj S
b9aa4444b3 feat: Allow users to create dashboard apps to give agents more context (#4761) 2022-06-01 11:13:10 +05:30