canove / whaticket-community Goto Github PK
View Code? Open in Web Editor NEWA very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
License: MIT License
A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
License: MIT License
im trying to log in in demo page with [email protected] and demo123 and the form didnt pass of the login page
Request Rest API Documentation and Webhook
Hello!
Not a issue! [ Suggestion ]
Since my bot is also in some groups, i've been using in my Whaticket instance, the function msg.author != null
.
What it does is that it ignores group messages.
Reason why im using that function:
I realized that someone send a message in a group the backend says it came from the person directly to me like if it were a private message not a group message. And it feels like the person is talking to me while the person is actually talking to the group.
I don't know if it will be useful inserting that code in Whaticket, but i wanted to point out what i found.
My code (wbotMessageListener.js):
wbot.on("message_create", async msg => {
// console.log(msg);
if (
msg.from === "status@broadcast" ||
msg.type === "location" ||
msg.type === "call_log" ||
msg.author != null // Ignore Group Messages
) {
return;
}
Hello! Thanks for the hard work into making Whaticket - Ticket System Client for Whatsapp!
I got a issue... i hope its not only me, if it is then sorry.
But, when using the Whaticket Backend with Whatsapp-Web.js auto responder functions like:
else if (msg.body == '!ping') {
// Send a new message to the same chat
wbot.sendMessage(msg.from, 'pong');
The last message doesn't get update on the Frontend Client when the message was sent by the bot in that auto respond function above,
the last message only updates if the last message was sent by the team/support agent (typed message).
So if the bot send like 3 auto messages, the last message shown on the Frontend Client its the message before those 3 messages that the bot sent, and not really the last message.
That also happens with any android auto responder whatsapp, just install an auto responder app for whatsapp on the phone and set your bot to reply to your customer, when the bot replies the customer, the team/support agent won't see the message that the bot has sent.
Example:
John Doe send message: " Hi "
Bot (whatsapp-web.js library) reply message: " Hey, how you doing "
Bot (any android app auto responder for whatsapp) reply message: " Hey, how you doing "
Last message shown on the Frontend to the team/support agent = " Hi ". (while it should be " Hey, how you doing ")
My code:
wbot.on("message", async msg => {
// console.log(msg);
if (msg.from === "status@broadcast" || msg.type === "location") {
return;
}
else if (msg.body == '!ping') {
// Send a new message to the same chat
wbot.sendMessage(msg.from, 'pong');
}
In 9 days ago, an user called wirys created in a fork/pull of your project a cool implement: the ticket in chat
Could you please review the pull and put in the your master?
Because I really think that's a good implement to your project.
Create a background outcome webhooks for integration with other platforms.
When certain actions happens, it could call urls. On moments like:
1 - When a ticket was open.
2 - When a ticket was assigned.
3 - When a ticket was transferred.
4 - When a ticket was closed.
5 - When any message was enter(sent or received).
6 - When a message was received.
7 - When a message was sent.
So it could be integrated with many other sell platforms.
i cant transfer option, it's disable.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/deploy/whaticket/frontend/node_modules/.bin:/us$
9 verbose lifecycle [email protected]~build: CWD: /home/deploy/whaticket/frontend
10 silly lifecycle [email protected]~build: Args: [ '-c', 'react-scripts build' ]
11 silly lifecycle [email protected]~build: Returned: code: 1 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/deploy/whaticket/frontend
16 verbose Linux 4.15.0-39-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v12.19.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `react-scripts build`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I am installing on AWS and getting a MySQL connection error.
In my .env file, I have localhost for the database name
ubuntu@ip-172-31-24-121:~/whaticket/backend$ npx sequelize db:migrate
Sequelize CLI [Node: 12.18.4, CLI: 5.5.1, ORM: 5.22.3]
Loaded configuration file "dist/config/database.js".
ERROR: Access denied for user 'whaticket'@'172.17.0.1' (using password: YES)
ubuntu@ip-172-31-24-121:~/whaticket/backend$
I would like to suggest and ask for guidance on where to start looking for implementing webhooks, the idea is to push automated messages like this api.backend.com/?num=xxxxxxxx&action=quickreply1
we can also use the same to activate quick replies from the frontend as well.
Estou com um problema de CORS, quando tento fazer login na página de frontend, ele dá erro de CORS, pra usar a aplicação preciso usar uma extensão que altera o cabeçalho.
Já tentei mudar em todas as rotas do projeto e adicionar
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
porém mesmo assim não dá certo, alguma dica?
I have setup whaticket on AWS. I have followed instructions in the readme file. How do I check if services are running?
When I login into the frontend, I am getting invalid login session error: https://app.pawa.co.zw/login
(I am getting the same error from the web demo site)
The back end shows error: https://api.pawa.co.zw/
Hi.
When I tried to enter the command npx sequelize db:migrate
the error appeared, do you know hot to solve it?
~/whaticket/backend$ npx sequelize db:migrate
Sequelize CLI [Node: 12.19.0, CLI: 5.5.1, ORM: 5.22.3]
Loaded configuration file "dist/config/database.js".
ERROR: Dialect needs to be explicitly supplied as of v4.0.0
Congratulations on the project.
I identified that the button to activate the whatsApp session and qrcode appear is not appearing in the current version. Therefore, there is no way to activate the number.
Hello guys!
Did any of you guys have these errors while using whaticket and can you help me?
When wanting to send an emoticon, a page connection error message appears. But the emoticon is still sent to the recipient.
When the user tries to log in for the first time, an invalid session error appears as shown in the image. But if you try a second time, you will be logged in normally.
Thank you very much!
Olá, percebi que no seu código está comentada os códigos:
const chats = await wbot.getChats();
let unreadMessages;
for (let chat of chats) {
if (chat.unreadCount > 0) {
unreadMessages = await chat.fetchMessages({
limit: chat.unreadCount,
});
Messageset.store(unreadMessages);
}
}
console.log(unreadMessages);
Mas percebi que está incompleto, os dados não estão sendo armazenado no DB. Pergunto quais funções para que esses dados sejam tratados e armazenados no db?
Há a possibilidade de manter apenas mensagens enviadas no privado, ignorando mensagens de grupos?
Hello @canove interesting project, I would like to install it on the server (hostiger) where my website is located, how would the installation process be? Please if you could give me further indications. try to install it on localhost (local PC) and the Docker installation says it has trouble starting. I did not know how to continue.
Thanks for the awesome project, I would suggest implementing a quick reply feature like this - https://whatshash.com/user-guide/quick-replies-feature-on-whatsapp/.
(node:3464) UnhandledPromiseRejectionWarning: Error: Evaluation failed: t
at ExecutionContext._evaluateInternal (C:\Bots\whaticket-master\backend\node
_modules\puppeteer\lib\ExecutionContext.js:102:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ExecutionContext.evaluate (C:\Bots\whaticket-master\backend\node_mo
dules\puppeteer\lib\ExecutionContext.js:33:16)
at async Client.sendPresenceAvailable (C:\Bots\whaticket-master\backend\node
_modules\whatsapp-web.js\src\Client.js:537:16)
-- ASYNC --
at ExecutionContext.<anonymous> (C:\Bots\whaticket-master\backend\node_modul
es\puppeteer\lib\helper.js:94:19)
at DOMWorld.evaluate (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\DOMWorld.js:89:24)
-- ASYNC --
at Frame.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\helper.js:94:19)
at Page.evaluate (C:\Bots\whaticket-master\backend\node_modules\puppeteer\li
b\Page.js:612:14)
at Page.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppeteer
\lib\helper.js:95:27)
at Client.sendPresenceAvailable (C:\Bots\whaticket-master\backend\node_modul
es\whatsapp-web.js\src\Client.js:537:35)
at Client.<anonymous> (C:\Bots\whaticket-master\backend\src\libs\wbot.js:69:
9)
(node:3464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 4)
(node:3464) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector
"canvas" failed: timeout 45000ms exceeded
at new WaitTask (C:\Bots\whaticket-master\backend\node_modules\puppeteer\lib
\DOMWorld.js:388:34)
at DOMWorld._waitForSelectorOrXPath (C:\Bots\whaticket-master\backend\node_m
odules\puppeteer\lib\DOMWorld.js:313:26)
at DOMWorld.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\p
uppeteer\lib\DOMWorld.js:296:21)
at Frame.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\pupp
eteer\lib\FrameManager.js:384:51)
at Frame.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\helper.js:95:27)
at Page.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\puppe
teer\lib\Page.js:799:33)
at Timeout.getQrCode (C:\Bots\whaticket-master\backend\node_modules\whatsapp
-web.js\src\Client.js:110:28)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 5)
(node:3464) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector
"canvas" failed: timeout 45000ms exceeded
at new WaitTask (C:\Bots\whaticket-master\backend\node_modules\puppeteer\lib
\DOMWorld.js:388:34)
at DOMWorld._waitForSelectorOrXPath (C:\Bots\whaticket-master\backend\node_m
odules\puppeteer\lib\DOMWorld.js:313:26)
at DOMWorld.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\p
uppeteer\lib\DOMWorld.js:296:21)
at Frame.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\pupp
eteer\lib\FrameManager.js:384:51)
at Frame.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\helper.js:95:27)
at Page.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\puppe
teer\lib\Page.js:799:33)
at Timeout.getQrCode (C:\Bots\whaticket-master\backend\node_modules\whatsapp
-web.js\src\Client.js:110:28)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 6)
other thing, i start this on aws vps, but the server was calling the privete IP note the public ip, how can i fix it?
Followed the tutorial to setup this on a Debanin 10 GCE instance. PM2 gives me:
pm2 list
┌─────┬───────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼───────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ whaticket-backend │ default │ 1.0.0 │ fork │ 1695 │ 42s │ 0 │ online │ 0% │ 69.8mb │ dee… │ disabled │
│ 1 │ whaticket-frontend │ default │ 0.1.0 │ fork │ 1738 │ 27s │ 0 │ online │ 0% │ 40.7mb │ dee… │ disabled │
└─────┴───────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
But accessing the domain shows error: Cannot GET /
EDIT:
When I run frontend in console it says : Local: http://localhost:3000
but in nginx
config for frontend we used proxy_pass http://127.0.0.1:3333;
? Could this be an issue? Also, I usd yarn instead of npm
if that matters.
Mistake was whaticket is using two sub-domains, and I used one in nginx config.
Hi!
First: I thank you very much for your project.
Second: Could you help me upload this project to heroku?
I am trying to upload it but heroku returns the error: Application not supported by 'heroku / nodejs' buildpack
I understand that it may be because the package.json is not found in the root. But in this case there are 2 package.json. One on frontend and one on backend.
After I updated with git pull, when attaching a file an error is appearing:
https://i.imgur.com/K230rgO.png
POST appears on the console http: // ***: 8080 / messages / 16 500 (Internal Server Error).
Would anyone know what could be happening?
/whaticket/backend$
drwxrwxr-x 2 deploy deploy 12288 Oct 26 19:31 public/
Create a background outcome webhooks for integration with other platforms.
When certain actions happens, it could call urls. On moments like:
1 - When a ticket was open.
2 - When a ticket was assigned.
3 - When a ticket was transferred.
4 - When a ticket was closed.
5 - When any message was enter(sent or received).
6 - When a message was received.
7 - When a message was sent.
So it could be integrated with many other sell platforms.
A maioria dos Helpdesk que conheço atualmente utilizam o S3 da amazon, adicionar essa função ao Whaticket facilitaria muito o acesso aos arquivos tendo a possibilidade se necessário baixar vários arquivos com maior agilidade e facilitando a gestão.
Add MIT license to the project. So we can use it without any concern
I saw that some screens on the system are similar to the whatsapp screen, did you recreate the interface or do you embed it?
Hello, i think that's a new enhancement is the system of presets messages, like:
Wellcome, busy, offline, custom msg.
the session expire if u not send or update the web for 5 minuts aprox...
when reload the web... u can't login... u need delete cookies and more to can login again!
I will try to implement transfer ticket feature.
requirements:
Hi, suddenly my check and double-check icons stop being shown that they were read or sent, it just shows the clock icon, however of this issue, the messages system is working fine. How can I fix it without relinking the session, I already tried restarting the backend and frontend but it didn't work, how can I address this issue?.
thanks.
Important update
This release fixes an issue introduced in WhatsApp Web v2.2043.8 that prevented media messages from being sent reliably. Updating to this version is required to continue sending media messages.
https://github.com/pedroslopez/whatsapp-web.js/releases/tag/v1.10.0
i fresh installation to test the new version...
and i cant register accout... and you can logging with an inexistent accounts.
(i cleared the browser.)
all database has been installed without problems.
Error: Evaluation failed: Error: MsgKey error: don't have a matching constructor
suddenly I got this message in my backend while in the web site:
Error: Request failed with status code 500.
I would like to upgrade an existing install and test the ticket transfer feature. I followed the instructions for installation and I am getting the below error after running: npx sequelize db:seed:all
ubuntu@ip-172-31-24-121:~/whaticket/backend$ npx sequelize db:seed:all
Sequelize CLI [Node: 12.19.0, CLI: 5.5.1, ORM: 5.22.3]
Loaded configuration file "dist/config/database.js".
== 20200904070004-create-default-settings: migrating =======
ERROR: Validation error
What is the best way to upgrade an existing installation
Definitely not a whatticket issue but where to add the --no-sandbox to run all of this as root?
[nodemon] starting `node src/app.js`
Server started on port: 8080
(node:23531) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[0828/114941.087419:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Ao criar uma nova conexão o sistema faz o cadastro porém fica apenas em loading e não aparece o qrcode, não gera erro no console, nem algo do tipo.
I will not post anything else here, they tried bruteforce on my server instead of helping us, as is the purpose of github.
Hi
Would be cool if we can have line break in the chat.
I noticed is that Whaticket isn't recognizing \n
,
the backend console receives a message with \n
, but when its inserted in the database the \n
gets deleted.
Message body received in backend:
hasMedia: false,
body: 'Hello\nHello',
type: 'chat',
Text shown in the frontend:
Hello Hello
While with line break \n
, it would look like:
Hello
Hello
Error: ENOENT: no such file or directory, stat '/home/deploy/whaticket/frontend/build/index.html'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.