Skip to content

Commit 901954d

Browse files
committed
Merge branch 'release/1.7.0'
2 parents 45e03d8 + 286fe03 commit 901954d

File tree

84 files changed

+7997
-3275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+7997
-3275
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
jobs:
8+
build-amd:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out the repo
12+
uses: actions/checkout@v3
13+
14+
- name: Extract existing image metadata
15+
id: image-meta
16+
uses: docker/metadata-action@v4
17+
with:
18+
images: atendai/evolution-api
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v2
22+
23+
- name: Log in to Docker Hub
24+
uses: docker/login-action@v2
25+
with:
26+
username: ${{ secrets.DOCKER_USERNAME }}
27+
password: ${{ secrets.DOCKER_PASSWORD }}
28+
29+
- name: Build and push AMD image
30+
uses: docker/build-push-action@v4
31+
with:
32+
context: .
33+
labels: ${{ steps.image-meta.outputs.labels }}
34+
platforms: linux/amd64
35+
push: true
36+
37+
build-arm:
38+
runs-on: buildjet-4vcpu-ubuntu-2204-arm
39+
steps:
40+
- name: Check out the repo
41+
uses: actions/checkout@v3
42+
43+
- name: Extract existing image metadata
44+
id: image-meta
45+
uses: docker/metadata-action@v4
46+
with:
47+
images: atendai/evolution-api
48+
49+
- name: Set up Docker Buildx
50+
uses: docker/setup-buildx-action@v2
51+
52+
- name: Log in to Docker Hub
53+
uses: docker/login-action@v2
54+
with:
55+
username: ${{ secrets.DOCKER_USERNAME }}
56+
password: ${{ secrets.DOCKER_PASSWORD }}
57+
58+
- name: Build and push ARM image
59+
uses: docker/build-push-action@v4
60+
with:
61+
context: .
62+
labels: ${{ steps.image-meta.outputs.labels }}
63+
platforms: linux/arm64
64+
push: true

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
/Docker/.env
66

7+
.vscode
8+
79
# Logs
810
logs/**.json
911
*.log
@@ -44,4 +46,5 @@ docker-compose.yaml
4446
/temp/*
4547

4648
.DS_Store
47-
*.DS_Store
49+
*.DS_Store
50+
.tool-versions

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@
99
"source.fixAll": "explicit"
1010
},
1111
"prisma-smart-formatter.typescript.defaultFormatter": "esbenp.prettier-vscode",
12-
"prisma-smart-formatter.prisma.defaultFormatter": "Prisma.prisma"
12+
"prisma-smart-formatter.prisma.defaultFormatter": "Prisma.prisma",
13+
"i18n-ally.localesPaths": [
14+
"store/messages"
15+
]
1316
}

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
# 1.7.0 (2024-03-11 18:23)
2+
3+
### Feature
4+
5+
* Added update message endpoint
6+
* Add translate capabilities to QRMessages in CW
7+
* Join in Group by Invite Code
8+
* Read messages from whatsapp in chatwoot
9+
* Add support to use use redis in cacheservice
10+
* Add support for labels
11+
* Command to clearcache from chatwoot inbox
12+
* Whatsapp Cloud API Oficial
13+
14+
### Fixed
15+
16+
* Proxy configuration improvements
17+
* Correction in sending lists
18+
* Adjust in webhook_base64
19+
* Correction in typebot text formatting
20+
* Correction in chatwoot text formatting and render list message
21+
* Only use a axios request to get file mimetype if necessary
22+
* When possible use the original file extension
23+
* When receiving a file from whatsapp, use the original filename in chatwoot if possible
24+
* Remove message ids cache in chatwoot to use chatwoot's api itself
25+
* Adjusts the quoted message, now has contextInfo in the message Raw
26+
* Collecting responses with text or numbers in Typebot
27+
* Added sendList endpoint to swagger documentation
28+
* Implemented a function to synchronize message deletions on WhatsApp, automatically reflecting in Chatwoot.
29+
* Improvement on numbers validation
30+
* Fix polls in message sending
31+
* Sending status message
32+
* Message 'connection successfully' spamming
33+
* Invalidate the conversation cache if reopen_conversation is false and the conversation was resolved
34+
* Fix looping when deleting a message in chatwoot
35+
* When receiving a file from whatsapp, use the original filename in chatwoot if possible
36+
* Correction in the sendList Function
37+
* Implement contact upsert in messaging-history.set
38+
* Improve proxy error handling
39+
* Refactor fetching participants for group in WhatsApp service
40+
* Fixed problem where the typebot final keyword did not work
41+
* Typebot's wait now pauses the flow and composing is defined by the delay_message parameter in set typebot
42+
* Composing over 20s now loops until finished
43+
144
# 1.6.1 (2023-12-22 11:43)
245

346
### Fixed

Docker/.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ LOG_BAILEYS=error
1616
# Default time: 5 minutes
1717
# If you don't even want an expiration, enter the value false
1818
DEL_INSTANCE=false
19+
DEL_TEMP_INSTANCES=true # Delete instances with status closed on start
1920

2021
# Temporary data storage
2122
STORE_MESSAGES=true
@@ -47,10 +48,17 @@ REDIS_URI=redis://redis:6379
4748
REDIS_PREFIX_KEY=evdocker
4849

4950
RABBITMQ_ENABLED=false
51+
RABBITMQ_RABBITMQ_MODE=global
52+
RABBITMQ_EXCHANGE_NAME=evolution_exchange
5053
RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672
5154

5255
WEBSOCKET_ENABLED=false
5356

57+
WA_BUSINESS_TOKEN_WEBHOOK=evolution
58+
WA_BUSINESS_URL=https://graph.facebook.com
59+
WA_BUSINESS_VERSION=v18.0
60+
WA_BUSINESS_LANGUAGE=pt_BR
61+
5462
SQS_ENABLED=false
5563
SQS_ACCESS_KEY_ID=
5664
SQS_SECRET_ACCESS_KEY=
@@ -84,6 +92,8 @@ WEBHOOK_EVENTS_GROUPS_UPSERT=true
8492
WEBHOOK_EVENTS_GROUPS_UPDATE=true
8593
WEBHOOK_EVENTS_GROUP_PARTICIPANTS_UPDATE=true
8694
WEBHOOK_EVENTS_CONNECTION_UPDATE=true
95+
WEBHOOK_EVENTS_LABELS_EDIT=true
96+
WEBHOOK_EVENTS_LABELS_ASSOCIATION=true
8797
WEBHOOK_EVENTS_CALL=true
8898
# This event fires every time a new token is requested via the refresh route
8999
WEBHOOK_EVENTS_NEW_JWT_TOKEN=false
@@ -109,6 +119,13 @@ QRCODE_COLOR=#198754
109119
TYPEBOT_API_VERSION=latest
110120
TYPEBOT_KEEP_OPEN=false
111121

122+
#Chatwoot
123+
# If you leave this option as false, when deleting the message for everyone on WhatsApp, it will not be deleted on Chatwoot.
124+
CHATWOOT_MESSAGE_DELETE=false # false | true
125+
# This db connection is used to import messages from whatsapp to chatwoot database
126+
CHATWOOT_IMPORT_DATABASE_CONNECTION_URI=postgres://user:password@hostname:port/dbname
127+
CHATWOOT_IMPORT_DATABASE_PLACEHOLDER_MEDIA_MESSAGE=true
128+
112129
# Defines an authentication type for the api
113130
# We recommend using the apikey because it will allow you to use a custom token,
114131
# if you use jwt, a random token will be generated and may be expired and you will have to generate a new token

Docker/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44

55
api:
66
container_name: evolution_api
7-
image: davidsongomes/evolution-api
7+
image: atendai/evolution-api
88
restart: always
99
ports:
1010
- 8080:8080
@@ -19,4 +19,4 @@ services:
1919

2020
volumes:
2121
evolution_instances:
22-
evolution_store:
22+
evolution_store:

Docker/evolution-api-all-services/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ LOG_BAILEYS=error
1616
# Default time: 5 minutes
1717
# If you don't even want an expiration, enter the value false
1818
DEL_INSTANCE=false
19+
DEL_TEMP_INSTANCES=true # Delete instances with status closed on start
1920

2021
# Temporary data storage
2122
STORE_MESSAGES=true
@@ -73,6 +74,8 @@ WEBHOOK_EVENTS_GROUPS_UPSERT=true
7374
WEBHOOK_EVENTS_GROUPS_UPDATE=true
7475
WEBHOOK_EVENTS_GROUP_PARTICIPANTS_UPDATE=true
7576
WEBHOOK_EVENTS_CONNECTION_UPDATE=true
77+
WEBHOOK_EVENTS_LABELS_EDIT=true
78+
WEBHOOK_EVENTS_LABELS_ASSOCIATION=true
7679
# This event fires every time a new token is requested via the refresh route
7780
WEBHOOK_EVENTS_NEW_JWT_TOKEN=false
7881

Docker/evolution-api-all-services/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ services:
6262

6363
api:
6464
container_name: evolution_api
65-
image: davidsongomes/evolution-api
65+
image: atendai/evolution-api
6666
restart: always
6767
depends_on:
6868
- mongodb
@@ -88,4 +88,4 @@ volumes:
8888
networks:
8989
evolution-net:
9090
external: true
91-
91+

Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM node:20.7.0-alpine AS builder
22

3-
LABEL version="1.6.1" description="Api to control whatsapp features through http requests."
3+
LABEL version="1.7.0" description="Api to control whatsapp features through http requests."
44
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes"
55
LABEL contact="contato@agenciadgcode.com"
66

@@ -35,6 +35,7 @@ ENV LOG_COLOR=true
3535
ENV LOG_BAILEYS=error
3636

3737
ENV DEL_INSTANCE=false
38+
ENV DEL_TEMP_INSTANCES=true
3839

3940
ENV STORE_MESSAGES=true
4041
ENV STORE_MESSAGE_UP=true
@@ -62,10 +63,17 @@ ENV REDIS_URI=redis://redis:6379
6263
ENV REDIS_PREFIX_KEY=evolution
6364

6465
ENV RABBITMQ_ENABLED=false
66+
ENV RABBITMQ_MODE=global
67+
ENV RABBITMQ_EXCHANGE_NAME=evolution_exchange
6568
ENV RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672
6669

6770
ENV WEBSOCKET_ENABLED=false
6871

72+
ENV WA_BUSINESS_TOKEN_WEBHOOK=evolution
73+
ENV WA_BUSINESS_URL=https://graph.facebook.com
74+
ENV WA_BUSINESS_VERSION=v18.0
75+
ENV WA_BUSINESS_LANGUAGE=pt_BR
76+
6977
ENV SQS_ENABLED=false
7078
ENV SQS_ACCESS_KEY_ID=
7179
ENV SQS_SECRET_ACCESS_KEY=
@@ -98,6 +106,8 @@ ENV WEBHOOK_EVENTS_GROUPS_UPSERT=true
98106
ENV WEBHOOK_EVENTS_GROUPS_UPDATE=true
99107
ENV WEBHOOK_EVENTS_GROUP_PARTICIPANTS_UPDATE=true
100108
ENV WEBHOOK_EVENTS_CONNECTION_UPDATE=true
109+
ENV WEBHOOK_EVENTS_LABELS_EDIT=true
110+
ENV WEBHOOK_EVENTS_LABELS_ASSOCIATION=true
101111
ENV WEBHOOK_EVENTS_CALL=true
102112

103113
ENV WEBHOOK_EVENTS_NEW_JWT_TOKEN=false

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "evolution-api",
3-
"version": "1.6.1",
3+
"version": "1.7.0",
44
"description": "Rest api for communication with WhatsApp",
55
"main": "./dist/src/main.js",
66
"scripts": {
@@ -46,11 +46,11 @@
4646
"@figuro/chatwoot-sdk": "^1.1.16",
4747
"@hapi/boom": "^10.0.1",
4848
"@sentry/node": "^7.59.2",
49-
"@whiskeysockets/baileys": "github:PurpShell/Baileys#combined",
49+
"@whiskeysockets/baileys": "6.6.0",
5050
"amqplib": "^0.10.3",
5151
"aws-sdk": "^2.1499.0",
52-
"axios": "^1.3.5",
53-
"class-validator": "^0.13.2",
52+
"axios": "^1.6.5",
53+
"class-validator": "^0.14.1",
5454
"compression": "^1.7.4",
5555
"cors": "^2.8.5",
5656
"cross-env": "^7.0.3",
@@ -60,28 +60,33 @@
6060
"exiftool-vendored": "^22.0.0",
6161
"express": "^4.18.2",
6262
"express-async-errors": "^3.1.1",
63+
"form-data": "^4.0.0",
6364
"hbs": "^4.2.0",
65+
"https-proxy-agent": "^7.0.2",
66+
"i18next": "^23.7.19",
6467
"jimp": "^0.16.13",
6568
"join": "^3.0.0",
6669
"js-yaml": "^4.1.0",
6770
"jsonschema": "^1.4.1",
68-
"jsonwebtoken": "^8.5.1",
71+
"jsonwebtoken": "^9.0.2",
6972
"libphonenumber-js": "^1.10.39",
7073
"link-preview-js": "^3.0.4",
7174
"mongoose": "^6.10.5",
7275
"node-cache": "^5.1.2",
7376
"node-mime-types": "^1.1.0",
7477
"node-windows": "^1.0.0-beta.8",
78+
"parse-bmfont-xml": "^1.1.4",
79+
"pg": "^8.11.3",
7580
"pino": "^8.11.0",
76-
"proxy-agent": "^6.3.0",
7781
"qrcode": "^1.5.1",
7882
"qrcode-terminal": "^0.12.0",
7983
"redis": "^4.6.5",
80-
"sharp": "^0.30.7",
84+
"sharp": "^0.32.2",
8185
"socket.io": "^4.7.1",
8286
"socks-proxy-agent": "^8.0.1",
8387
"swagger-ui-express": "^5.0.0",
8488
"uuid": "^9.0.0",
89+
"xml2js": "^0.6.2",
8590
"yamljs": "^0.3.0"
8691
},
8792
"devDependencies": {

0 commit comments

Comments
 (0)