Giter VIP home page Giter VIP logo

whaticket-community's People

Contributors

alicompu avatar allgood avatar canove avatar cauelugli avatar dantecvip avatar dev-stupid-codes avatar dionatas-develcode avatar ertprs avatar esteves67 avatar filipeborelli avatar fogolin avatar horgun avatar igortrust avatar jhonnatanbezerra avatar kouthk avatar lipflip avatar macleysousa avatar optinzap avatar phegalante avatar ricardoapaes avatar rochac2lee avatar rtenorioh avatar tatosjb avatar tonnybarros avatar w3nder avatar wirys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whaticket-community's Issues

[Feature Suggestion] Ignore Group Messages

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;
		}

[Bug] Mysterious chat?

Not sure how this chat (notice no messages) found its way in there, it's not on phone and web.whatsapp.com

Screenshot at Sep 11 21-23-19

[Feature Suggestion] Last message doesn't update if last message was sent by the bot in autorespond function

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');
}

[Feature Suggestion] Recurso de Cadastramento na primeira interação.

Seria possível , quando receber a primeira mensagem , colocar o número que fez contato em um estado de "Questionário" aonde ele deve responder perguntas , como :

Qual seu Nome ?
Qual Idade ?
Qual Cidade ?

Algumas respostas necessitam de validação e algumas de confirmação.

Um exemplo :

image

image

[Feature Suggestion] Outcome Webhooks

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.

error npm run build frontend

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 ]

mySQL connection error

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$

[Feature Suggestion] Webhooks for automation

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.

ERRO DE CORS

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?

[Error] Sequelize CLI

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

[Help] Error sending emoticon and login

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.
image

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.
image

Thank you very much!

Pega as mensagens nao lidas (recebidas quando o bot estava offline)

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?

No QR code?

Added a new user but it's neither asking for QR code nor showing any option to trigger one?

Screenshot at Sep 11 11-28-52

[Bug] Few fixes..

A few fixes are needed:

A). Clicking Accept produces Error 500
Screenshot at Aug 26 08-31-46

B). Dialogs should use English as Default option.
Screenshot at Aug 26 08-32-03

How to install on a web server specifically (hostiger)

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.

Error when authenticated done

(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?
image

Cannot GET /

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.

Help with heroku please

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.

[Feature Suggestion] Outcome webhooks for automation

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.

embed whatsapp

I saw that some screens on the system are similar to the whatsapp screen, did you recreate the interface or do you embed it?

preset messages whatsapp

Hello, i think that's a new enhancement is the system of presets messages, like:
Wellcome, busy, offline, custom msg.

Session

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!

[Feature] Transfer ticket.

I will try to implement transfer ticket feature.

requirements:

  • change assigned operator;
  • log an system message informing about the transfer.

check and double-check disappear

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.
Untitled

Erro preview image

I have this erro in preview theimg whem i send or recive, the link is that:
undefined:undefined/public/1599703840204.jpg
the link that right : IP or DOMAIN:PORT/public/1599703840204.jpg

image

Other Session Problem?

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.

[Question] How to upgrade

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

[Help] Running as root without --no-sandbox is not supported.

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.

Problemas em conexões

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.

[Feature Suggestion] Line Break

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.