Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Custom Features #2

Open
wants to merge 338 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
338 commits
Select commit Hold shift + click to select a range
608592d
Merge branch 'release/3.5.2'
sojan-official Jan 19, 2024
d8334f9
webhook toggle enabled
jderecho Jan 22, 2024
a15563e
refresh labels
jderecho Jan 22, 2024
2439490
csat response logo
jderecho Jan 22, 2024
a658a5f
open conversation count
jderecho Jan 22, 2024
e2c3150
plural
jderecho Jan 22, 2024
f3e94b3
add conversation count
jderecho Jan 25, 2024
fe200a2
fix attachment on new conversation
jderecho Jan 25, 2024
8c634d9
fix chat attachment
jderecho Jan 25, 2024
85f1c57
fix
jderecho Jan 25, 2024
8f227bb
Merge branch 'master' into master-staging
jderecho Jan 26, 2024
b311970
fix and require label
jderecho Jan 28, 2024
c5d60ff
agent view csat
jderecho Jan 29, 2024
7d24ca0
csat report fix
jderecho Jan 29, 2024
7eb8d8a
fix webflow conversations
jderecho Jan 30, 2024
987db60
fix
jderecho Jan 30, 2024
79e6d06
fix
jderecho Jan 30, 2024
a5fd854
fix auto reply bug
jderecho Jan 31, 2024
2de1d8f
auto reply fix
jderecho Jan 31, 2024
823ba6d
responded csat behavior
jderecho Jan 31, 2024
d98de25
add conversation id
jderecho Jan 31, 2024
131e0b8
fix existing invalid emails
jderecho Jan 31, 2024
11ca463
add webflow webhook
jderecho Jan 31, 2024
549ae96
csat hide url on agent view
jderecho Jan 31, 2024
f468345
fix data
jderecho Jan 31, 2024
4a5f981
fix
jderecho Jan 31, 2024
4d67b75
send message by booking id
jderecho Jan 31, 2024
b1e0bbe
webflow webhook and ticket api
jderecho Feb 5, 2024
6ee22a0
Merge pull request #14 from DigitalTolk/staging-webflow
jderecho Feb 6, 2024
eee6bb1
fix
jderecho Feb 6, 2024
5b3864d
Merge pull request #16 from DigitalTolk/staging-webflow-test
jderecho Feb 6, 2024
aad1d4f
remove guard and fix csat
jderecho Feb 6, 2024
35e38ac
Merge pull request #17 from DigitalTolk/staging-webflow-test
jderecho Feb 6, 2024
ef098b6
cleanup
jderecho Feb 6, 2024
a416994
Merge pull request #18 from DigitalTolk/staging-webflow-test
jderecho Feb 6, 2024
b884e05
remove temporary fix for invalid email
jderecho Feb 7, 2024
b235108
only info
jderecho Feb 7, 2024
3552e49
Merge pull request #19 from DigitalTolk/staging-webflow-test
jderecho Feb 7, 2024
6f84ae3
adjust log
jderecho Feb 7, 2024
33f745f
Merge pull request #20 from DigitalTolk/staging-webflow-test
jderecho Feb 7, 2024
11d39ab
enhancement fix
jderecho Feb 8, 2024
6b1c8b9
staging revert
jderecho Feb 8, 2024
5490aee
fix
jderecho Feb 8, 2024
57d2eff
fix invalid messages
jderecho Feb 8, 2024
68002b8
csat on reply fix
jderecho Feb 8, 2024
ee076c3
fix csat execution
jderecho Feb 8, 2024
3913156
fix
jderecho Feb 8, 2024
2eb674c
fix
jderecho Feb 8, 2024
334f0c2
another round of fix convo
jderecho Feb 9, 2024
85c4070
add backtrace
jderecho Feb 9, 2024
f9981a8
fix
jderecho Feb 9, 2024
9fa5012
fix
jderecho Feb 9, 2024
66583f6
no reply on csat
jderecho Feb 11, 2024
702cf3e
fix draft
jderecho Feb 11, 2024
47ac329
fix spec
jderecho Feb 12, 2024
1858b27
Merge branch 'staging' into master-staging
jderecho Feb 12, 2024
f752d0d
fix language for sweden
jderecho Feb 12, 2024
ec40529
fix
jderecho Feb 12, 2024
9ea8e14
Merge branch 'staging' into master-staging
jderecho Feb 12, 2024
d59c7ab
language update
jderecho Feb 12, 2024
ab2462d
fix test
jderecho Feb 12, 2024
87d66db
Merge branch 'staging' into master-staging
jderecho Feb 12, 2024
ef0a93c
Merge pull request #13 from DigitalTolk/master-staging
jderecho Feb 12, 2024
5e4d3a6
fix csat on replies
jderecho Feb 13, 2024
0ff344d
fix csat
jderecho Feb 13, 2024
f756996
fix
jderecho Feb 13, 2024
42c10e8
update
jderecho Feb 14, 2024
2bf2e17
fix conversation display id
jderecho Feb 14, 2024
856acf8
adjust survey
jderecho Feb 14, 2024
4f59df7
ticket replied
jderecho Feb 17, 2024
5eb6e19
toggle ticket
jderecho Feb 17, 2024
cb2b75c
Merge branch 'release/3.6.0'
sojan-official Feb 19, 2024
9ccf7e1
allow inboxes for created message event
jderecho Feb 19, 2024
e33bc8e
fix white font color on email bodies
jderecho Feb 20, 2024
13a674e
Merge branch 'master' into master-staging
jderecho Feb 20, 2024
d35e17c
fix email inline text attachment
jderecho Feb 21, 2024
5a2bbaa
ticket and ticket issue
jderecho Feb 23, 2024
222c3bc
cleanup
jderecho Feb 23, 2024
daa9490
block csat using custom attributes
jderecho Feb 23, 2024
742d097
fix
jderecho Feb 26, 2024
7aa9ecb
ticket issue update
jderecho Feb 26, 2024
8adece5
add logs
jderecho Feb 26, 2024
ec5b37f
add log migration
jderecho Feb 26, 2024
bde72ff
add more logs
jderecho Feb 27, 2024
4af34a8
fix threading issue
jderecho Feb 28, 2024
02e32fd
fix
jderecho Feb 28, 2024
0fe63ea
Merge branch 'staging' into master-staging
jderecho Feb 29, 2024
6f0ee60
fix specs
jderecho Feb 29, 2024
8d52968
Merge pull request #21 from DigitalTolk/master-staging
jderecho Feb 29, 2024
8c85707
fix threading for translator
jderecho Mar 1, 2024
6ae0c1d
Change attachment link to actual attachments
jderecho Mar 1, 2024
87db1da
fix automation bug
jderecho Mar 5, 2024
8ae1818
optional quoted message
jderecho Mar 6, 2024
e1e0c45
find_conversation by email
jderecho Mar 6, 2024
93bba83
feat: archived conversation
jderecho Mar 8, 2024
f8246c8
fix mailer
jderecho Mar 8, 2024
9094866
feat: change contact
jderecho Mar 12, 2024
6cf87e7
Merge pull request #23 from DigitalTolk/feat/change-contact
kyrylokulyhin Mar 13, 2024
699e82e
fix cc
jderecho Mar 13, 2024
288443d
Merge pull request #24 from DigitalTolk/feat/change-contact
jderecho Mar 13, 2024
63a21b9
update
jderecho Mar 13, 2024
579f584
update
jderecho Mar 13, 2024
3d6c10f
rename archived to closed
jderecho Mar 14, 2024
0c4fdc9
add migration
jderecho Mar 14, 2024
10ded7e
update
jderecho Mar 14, 2024
a17248b
update
jderecho Mar 15, 2024
e93af26
Merge branch 'release/3.7.0'
sojan-official Mar 18, 2024
ca61786
feat closed convo update
jderecho Mar 18, 2024
2de1779
Merge pull request #22 from DigitalTolk/feat/archived-conversation
jderecho Mar 18, 2024
9bfed78
feat closed fix
jderecho Mar 19, 2024
c10bb2b
update
jderecho Mar 19, 2024
a68c38a
Merge pull request #25 from DigitalTolk/feat/archived-conversation
jderecho Mar 19, 2024
7a7de43
feat reply conversation
jderecho Mar 19, 2024
08146c5
feat reply conversation fix test
jderecho Mar 19, 2024
9eb37d2
Merge pull request #26 from DigitalTolk/feat/reply-conversation
jderecho Mar 19, 2024
91a3732
update
jderecho Mar 19, 2024
5716762
Merge pull request #27 from DigitalTolk/feat/reply-conversation
jderecho Mar 19, 2024
3e26877
expand collapse menu items
jderecho Mar 20, 2024
76c40c9
time display and recently resolved tab
jderecho Mar 22, 2024
9db43ac
Merge branch 'master' into master-staging
jderecho Mar 22, 2024
bec0877
manual close conversation
jderecho Mar 25, 2024
f1fb8bc
close unclose conversation
jderecho Mar 26, 2024
6d75c3c
fix not closed after 24h update
jderecho Apr 1, 2024
e80e0f6
added distinct
jderecho Apr 1, 2024
417a154
fix
jderecho Apr 1, 2024
d68aff8
Merge branch 'staging' into master-staging
jderecho Apr 2, 2024
29f7328
fix specs
jderecho Apr 2, 2024
f1dae19
fix specs
jderecho Apr 4, 2024
d108b13
fix specs
jderecho Apr 4, 2024
b0f5a87
Merge pull request #28 from DigitalTolk/master-staging
jderecho Apr 4, 2024
fc67edc
feature: custom report filters
jderecho Apr 12, 2024
13b3871
fix
jderecho Apr 14, 2024
7f45dff
Merge pull request #29 from DigitalTolk/custom-report-filter
jderecho Apr 15, 2024
2b5ddad
custom report update
jderecho Apr 15, 2024
a0f17cd
Merge pull request #30 from DigitalTolk/custom-report-filter
jderecho Apr 15, 2024
02e4b0a
contact email search
jderecho Apr 15, 2024
626a836
rubocop fix
jderecho Apr 15, 2024
716967e
add questions filter
jderecho Apr 15, 2024
97a8f90
fix
jderecho Apr 15, 2024
85aeaf2
Merge branch 'release/3.8.0'
sojan-official Apr 17, 2024
4c728b8
improve report
jderecho Apr 17, 2024
18f10b7
fix
jderecho Apr 17, 2024
9ad10be
fix webflow forms
jderecho Apr 18, 2024
5aff293
Merge branch 'master' into master-staging
jderecho Apr 18, 2024
6b5ad0e
fix UI
jderecho Apr 18, 2024
e92f1dd
fix ui
jderecho Apr 18, 2024
5765b17
CD 61/62 - auto assign agents
jderecho Apr 19, 2024
2fea5e1
fix dangling csat
jderecho Apr 22, 2024
c2f9b33
fix assignments
jderecho Apr 23, 2024
8d155ce
resolved contact
jderecho Apr 24, 2024
947ae51
fix
jderecho Apr 24, 2024
074ef1b
update
jderecho Apr 25, 2024
31bd98d
smart actions
jderecho Apr 26, 2024
2b317e5
smart action update
jderecho Apr 26, 2024
70e4a70
fix flooded email notifications
jderecho Apr 26, 2024
9570b84
initial ui
jderecho Apr 29, 2024
43f2135
added api
jderecho Apr 30, 2024
809bf0b
auto resolved ticket/ticket issues
jderecho May 1, 2024
efcd60f
added specs
jderecho May 1, 2024
fac44dd
fix
jderecho May 2, 2024
0f0b7ac
ui and backend connection
jderecho May 2, 2024
2d967bb
add routes
jderecho May 2, 2024
2904aec
smart actions
jderecho May 3, 2024
41dce49
remove webhook guard
jderecho May 3, 2024
c9a956a
smart actions
jderecho May 6, 2024
86eab81
allow ticket/tickett issue to assign team
jderecho May 6, 2024
abaa94b
smart actions
jderecho May 6, 2024
d33edb6
Merge branch 'staging' into smart-actions
jderecho May 6, 2024
29eb632
smart actions
jderecho May 6, 2024
a726123
smart action
jderecho May 6, 2024
9cce399
fix spec
jderecho May 6, 2024
a4f3784
Merge pull request #32 from DigitalTolk/smart-actions
jderecho May 6, 2024
06ba517
feature enabled/disable
jderecho May 7, 2024
d3f8eab
Merge pull request #33 from DigitalTolk/smart-actions
jderecho May 7, 2024
d2d6963
update smart actions
jderecho May 8, 2024
7a35e21
smart action update
jderecho May 9, 2024
8078baa
smart actions
jderecho May 10, 2024
7a7a910
fix spec
jderecho May 10, 2024
7f47d77
Merge pull request #34 from DigitalTolk/smart-actions
jderecho May 10, 2024
a83c1e9
fix private note
jderecho May 10, 2024
a0e9360
Merge pull request #35 from DigitalTolk/smart-actions
jderecho May 10, 2024
d154ea8
fix custom_attributes errors
jderecho May 13, 2024
310eda5
Merge pull request #36 from DigitalTolk/smart-actions
jderecho May 13, 2024
f380c3c
add loggers
jderecho May 13, 2024
4d2c808
update loggers
jderecho May 13, 2024
6df35a3
Merge branch 'staging' into master-staging
jderecho May 14, 2024
6eecce0
add more logs
jderecho May 15, 2024
41e373a
Bump version to 3.9.0
sojan-official May 16, 2024
f7580f8
Merge branch 'release/3.9.0'
sojan-official May 16, 2024
db3de22
update design
jderecho May 16, 2024
e791b44
Merge branch 'smart-actions' into staging
jderecho May 16, 2024
bd17681
improve design
jderecho May 16, 2024
0f8fbbb
Merge branch 'master' into master-staging-3-9-0
jderecho May 16, 2024
92c0c86
add logs
jderecho May 20, 2024
d80f4bc
fix change email
jderecho May 20, 2024
71db7bc
Merge pull request #37 from DigitalTolk/master-staging-3-9-0
jderecho May 21, 2024
6bea9a6
Merge branch 'staging' into master-staging
jderecho May 21, 2024
803e4e7
webflow dynamic recipient
jderecho May 22, 2024
6608c1d
update test
jderecho May 23, 2024
76c8b95
remove temporary deploy check
jderecho May 23, 2024
8b7062c
webflow update
jderecho May 23, 2024
84c1660
webflow update
jderecho May 23, 2024
f7b6e88
Merge branch 'staging' into webflow-dynamic-recipient
jderecho May 23, 2024
6541a80
Merge pull request #38 from DigitalTolk/webflow-dynamic-recipient
jderecho May 24, 2024
aff1cc6
fixes
jderecho May 28, 2024
e3c1245
fix test
jderecho May 29, 2024
8e7a856
Merge pull request #31 from DigitalTolk/master-staging
jderecho May 29, 2024
2dffc5d
fix csat template setting
jderecho Jun 7, 2024
1e49ecf
multi assignment team and inbox
jderecho Jun 10, 2024
c2d59dc
mask agent name and email
jderecho Jun 12, 2024
d308e89
mandatory contact type
jderecho Jun 14, 2024
dce0840
update
jderecho Jun 18, 2024
c3ae687
fixes
jderecho Jun 18, 2024
211da65
auto assign fix
jderecho Jun 18, 2024
fd278fa
Merge pull request #40 from DigitalTolk/1067-mandatory-contact-type
jderecho Jun 18, 2024
911908b
cleanup copilot and autofill copilot response
jderecho Jun 20, 2024
02fb704
cleanup
jderecho Jun 20, 2024
b5c8a08
force copilot response
jderecho Jun 21, 2024
f0d026e
allow embedding for dt client site
jderecho Jun 24, 2024
aba208b
feat: allow non-paginated response
jderecho Jun 24, 2024
d1b9ed4
remove explicit definition for csp
jderecho Jun 24, 2024
b9874c8
feat: api account messages
jderecho Jun 24, 2024
a370bf9
rubocop fix
jderecho Jun 24, 2024
aec7171
Merge pull request #41 from DigitalTolk/smart-draft-copilot
jderecho Jun 24, 2024
cbba72c
Merge pull request #43 from DigitalTolk/non-paginated-csat-responses
jderecho Jun 24, 2024
104b17c
add other conversation kind
jderecho Jun 26, 2024
5b66ec0
fix: INT-1103 merged contact
jderecho Jul 1, 2024
166d007
fix error
jderecho Jul 1, 2024
928d472
fixes
jderecho Jul 1, 2024
7168ce3
update
jderecho Jul 1, 2024
b72fb6f
fix specs
jderecho Jul 2, 2024
51ca862
1103 update
jderecho Jul 2, 2024
79787bd
Merge pull request #44 from DigitalTolk/1103-fix-merged-contact
jderecho Jul 2, 2024
102cf0a
parquet api
jderecho Jul 9, 2024
b8f4737
fix: ci and ruby version
jderecho Jul 9, 2024
782539e
fix workflows
jderecho Jul 9, 2024
507f9c0
fix
jderecho Jul 9, 2024
01f0694
test
jderecho Jul 9, 2024
35bd9d3
permission fix
jderecho Jul 9, 2024
1d695b7
fix
jderecho Jul 9, 2024
a8a96ef
update
jderecho Jul 9, 2024
0378a59
fix
jderecho Jul 9, 2024
c4a25ea
fix
jderecho Jul 9, 2024
73cc795
workaround fix for ubuntu focal
jderecho Jul 9, 2024
6d8286a
fix github workflows
jderecho Jul 9, 2024
99ebbea
Merge pull request #45 from DigitalTolk/api-with-parquet
jderecho Jul 9, 2024
f585932
feat: help center for agents
jderecho Jul 9, 2024
f1fd475
fix helpcenter and parquet
jderecho Jul 10, 2024
501a57d
smart actions active status
jderecho Jul 12, 2024
9f4a761
last active
jderecho Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defaults: &defaults
working_directory: ~/build
docker:
# specify the version you desire here
- image: cimg/ruby:3.2.2-browsers
- image: cimg/ruby:3.2.4-browsers

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
args:
VARIANT: "ubuntu-22.04"
NODE_VERSION: "20.9.0"
RUBY_VERSION: "3.2.2"
RUBY_VERSION: "3.2.4"
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: "1000"
USER_GID: "1000"
Expand All @@ -25,7 +25,7 @@ services:
args:
VARIANT: "ubuntu-22.04"
NODE_VERSION: "20.9.0"
RUBY_VERSION: "3.2.2"
RUBY_VERSION: "3.2.4"
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: "1000"
USER_GID: "1000"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deploy_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
## deployment url will be of the form chatwoot-pr-<pr_number>.herokuapp.com
name: Deploy Check

on:
pull_request:
# disable for DT
# on:
# pull_request:

jobs:
deployment_check:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/run_foss_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,23 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: install parquet libraries
run: |
sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt-get install -y libarrow-dev libarrow-glib-dev libparquet-glib-dev libgirepository-1.0-1 libgirepository1.0-dev
sudo sed -i -e 's/-std=c++11//g' /usr/lib/x86_64-linux-gnu/pkgconfig/re2.pc

- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 21
cache: yarn

- name: yarn
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/run_response_bot_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,24 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: install parquet libraries
run: |
sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt-get install -y libarrow-dev libarrow-glib-dev libparquet-glib-dev libgirepository-1.0-1 libgirepository1.0-dev
sudo sed -i -e 's/-std=c++11//g' /usr/lib/x86_64-linux-gnu/pkgconfig/re2.pc

- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 21
cache: yarn

- name: yarn
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.2.4
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

ruby '3.2.2'
ruby '3.2.4'

##-- base gems for rails --##
gem 'rack-cors', '2.0.0', require: 'rack/cors'
Expand Down Expand Up @@ -175,6 +175,10 @@ gem 'pgvector'
# Convert Website HTML to Markdown
gem 'reverse_markdown'

gem 'gobject-introspection'
gem 'red-arrow'
gem 'red-parquet'

### Gems required only in specific deployment environments ###
##############################################################

Expand Down
29 changes: 27 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
csv (3.3.0)
csv-safe (3.2.1)
cypress-on-rails (1.16.0)
rack
Expand Down Expand Up @@ -227,6 +228,7 @@ GEM
et-orbi (1.2.7)
tzinfo
execjs (2.8.1)
extpp (0.1.1)
facebook-messenger (2.0.1)
httparty (~> 0.13, >= 0.13.7)
rack (>= 1.4.5)
Expand Down Expand Up @@ -260,6 +262,7 @@ GEM
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
fiddle (1.1.2)
flag_shih_tzu (0.3.23)
foreman (0.87.2)
fugit (1.9.0)
Expand All @@ -274,11 +277,19 @@ GEM
googleauth (~> 1.0)
grpc (~> 1.36)
geocoder (1.8.1)
gio2 (4.2.2)
fiddle
gobject-introspection (= 4.2.2)
gli (2.21.1)
glib2 (4.2.2)
native-package-installer (>= 1.0.3)
pkg-config (>= 1.3.5)
globalid (1.2.1)
activesupport (>= 6.1)
gmail_xoauth (0.4.3)
oauth (>= 0.3.6)
gobject-introspection (4.2.2)
glib2 (= 4.2.2)
google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
Expand Down Expand Up @@ -468,6 +479,7 @@ GEM
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
native-package-installer (1.1.9)
neighbor (0.2.3)
activerecord (>= 5.2)
net-http (0.4.1)
Expand Down Expand Up @@ -538,6 +550,7 @@ GEM
activerecord (>= 5.2)
activesupport (>= 5.2)
pgvector (0.1.1)
pkg-config (1.5.6)
procore-sift (1.0.0)
activerecord (>= 6.1)
pry (0.14.2)
Expand Down Expand Up @@ -602,6 +615,15 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
red-arrow (16.1.0)
bigdecimal (>= 3.1.0)
csv
extpp (>= 0.1.1)
gio2 (>= 3.5.0)
native-package-installer
pkg-config
red-parquet (16.1.0)
red-arrow (= 16.1.0)
redis (5.0.6)
redis-client (>= 0.9.0)
redis-client (0.22.1)
Expand Down Expand Up @@ -873,6 +895,7 @@ DEPENDENCIES
foreman
geocoder
gmail_xoauth
gobject-introspection
google-cloud-dialogflow-v2
google-cloud-storage
google-cloud-translate-v3
Expand Down Expand Up @@ -917,6 +940,8 @@ DEPENDENCIES
rack-mini-profiler (>= 3.2.0)
rack-timeout
rails (~> 7.0.8.1)
red-arrow
red-parquet
redis
redis-namespace
responders (>= 3.1.1)
Expand Down Expand Up @@ -960,7 +985,7 @@ DEPENDENCIES
working_hours

RUBY VERSION
ruby 3.2.2p185
ruby 3.2.4p170

BUNDLED WITH
2.4.6
2.5.14
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Chatwoot is a customer support tool for instant messaging channels",
"website": "https://www.chatwoot.com/",
"repository": "https://github.com/chatwoot/chatwoot",
"logo": "https://app.chatwoot.com/brand-assets/logo_thumbnail.svg",
"logo": "https://app.chatwoot.com/brand-assets/logo_thumbnail.png",
"keywords": [
"live chat",
"customer support",
Expand Down
17 changes: 17 additions & 0 deletions app/builders/csat_surveys/response_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,26 @@ def process_csat_response(conversation, rating, feedback_message)
message_id: message.id, account_id: message.account_id, conversation_id: message.conversation_id,
contact_id: conversation.contact_id, assigned_agent: conversation.assignee
)

update_message_content_attributes
csat_survey_response.csat_template_id = csat_template_question.csat_template_id
csat_survey_response.csat_template_question_id = csat_template_question.id
csat_survey_response.rating = rating
csat_survey_response.feedback_message = feedback_message
csat_survey_response.save!
csat_survey_response
end

def csat_template_question
@csat_template_question ||= (message.csat_template_question || CsatTemplateQuestion.load_by_content(message.content))
end

def update_message_content_attributes
return if (attrs = message.content_attributes[:submitted_values]).blank?

attrs['csat_template_question_id'] = csat_template_question&.id
# rubocop:disable Rails/SkipsModelValidations
message.update_column(:content_attributes, attrs)
# rubocop:enable Rails/SkipsModelValidations
end
end
1 change: 1 addition & 0 deletions app/builders/notification_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def user_subscribed_to_notification?
return false if notification_setting.blank?

return true if notification_setting.public_send("email_#{notification_type}?")
return false unless primary_actor.inbox.push_notification_enabled?
return true if notification_setting.public_send("push_#{notification_type}?")

false
Expand Down
46 changes: 46 additions & 0 deletions app/builders/smart_action_builder.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
class SmartActionBuilder
attr_accessor :errors

def initialize(conversation, params)
@conversation = conversation
@params = params
@errors = []
end

def perform
validate_params
return if @errors.present?

build_smart_action
rescue StandardError => e
@errors << e.message
nil
end

private

def validate_params
return if @params.present?

@errors << 'Missing parameters'
end

def build_smart_action
@smart_action = @conversation.smart_actions.create(smart_action_params)
end

def smart_action_params
@params.permit(
:name,
:label,
:description,
:event,
:intent_type,
:message_id,
:to,
:from,
:link,
:content
)
end
end
15 changes: 15 additions & 0 deletions app/controllers/api/v1/accounts/agents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ def create
)

@agent = builder.perform
update_teams_and_inboxes
end

def update
@agent.update!(agent_params.slice(:name).compact)
@agent.current_account_user.update!(agent_params.slice(:role, :availability, :auto_offline).compact)
update_teams_and_inboxes
end

def destroy
Expand Down Expand Up @@ -59,6 +61,11 @@ def bulk_create

private

def update_teams_and_inboxes
@agent.teams = Team.where(id: team_ids) if team_ids.present?
@agent.inboxes = Inbox.where(id: inbox_ids) if inbox_ids.present?
end

def check_authorization
super(User)
end
Expand All @@ -75,6 +82,14 @@ def new_agent_params
params.require(:agent).permit(:email, :name, :role, :availability, :auto_offline)
end

def team_ids
params[:team_ids] || []
end

def inbox_ids
params[:inbox_ids] || []
end

def agents
@agents ||= Current.account.users.order_by_full_name.includes(:account_users, { avatar_attachment: [:blob] })
end
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/api/v1/accounts/articles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ class Api::V1::Accounts::ArticlesController < Api::V1::Accounts::BaseController
def index
@portal_articles = @portal.articles
@all_articles = @portal_articles.search(list_params)
@articles_count = @all_articles.count
@all_articles = @all_articles.published unless Current.user.administrator?

@articles_count = @all_articles.count
@articles = if list_params[:category_slug].present?
@all_articles.order_by_position.page(@current_page)
else
Expand Down
19 changes: 17 additions & 2 deletions app/controllers/api/v1/accounts/contacts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
RESULTS_PER_PAGE = 15

before_action :check_authorization
before_action :set_current_page, only: [:index, :active, :search, :filter]
before_action :set_current_page, only: [:index, :active, :search, :filter, :phone_search, :email_search]
before_action :fetch_contact, only: [:show, :update, :destroy, :avatar, :contactable_inboxes, :destroy_custom_attributes]
before_action :set_include_contact_inboxes, only: [:index, :search, :filter]
before_action :set_include_contact_inboxes, only: [:index, :search, :filter, :phone_search, :email_search]

def index
@contacts_count = resolved_contacts.count
Expand All @@ -33,6 +33,21 @@ def search
@contacts = fetch_contacts(contacts)
end

def phone_search
render json: { error: 'Specify search string with parameter q' }, status: :unprocessable_entity if params[:q].blank? && return

contacts = resolved_contacts.where(phone_number: params[:q].strip)
render json: { found: contacts.exists?, search_key: params[:q] }
end

def email_search
render json: { error: 'Specify search string with parameter q' }, status: :unprocessable_entity if params[:q].blank? && return

contacts = resolved_contacts.where(email: params[:q].strip)
@contacts_count = contacts.count
@contacts = fetch_contacts(contacts)
end

def import
render json: { error: I18n.t('errors.contacts.import.failed') }, status: :unprocessable_entity and return if params[:import_file].blank?

Expand Down
Loading
Loading