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

Sending message from WEB isn't working #141

Closed
gituser opened this issue Apr 3, 2023 · 2 comments · Fixed by #157
Closed

Sending message from WEB isn't working #141

gituser opened this issue Apr 3, 2023 · 2 comments · Fixed by #157
Labels

Comments

@gituser
Copy link

gituser commented Apr 3, 2023

Describe the bug
When trying to send a message from WEB bot crashes with message (code was check from latest master, also tried latest v4.1.1 tag):

Web message
=== UNHANDLED ERROR ===
Mon Apr 03 2023 13:56:15: Error:  TypeError: Cannot read property 'toString' of undefined
    at Object.msg (/home/www/telegram-support/src/middleware.ts:67:10)
    at /home/www/telegram-support/src/users.ts:126:22
    at Object.getOpen (/home/www/telegram-support/src/db.ts:42:3)
    at Object.chat (/home/www/telegram-support/src/users.ts:91:8)
    at /home/www/telegram-support/src/text.ts:51:17
    at Object.getOpen (/home/www/telegram-support/src/db.ts:42:3)
    at ticketHandler (/home/www/telegram-support/src/text.ts:44:8)
    at Socket.<anonymous> (/home/www/telegram-support/src/addons/web.ts:56:26)
    at Socket.emit (events.js:400:28)
    at Socket.emit (domain.js:475:12)

To Reproduce
Steps to reproduce the behavior:

  1. set in config/config.yaml:
web_server: true # Enable/disable web server
web_server_port: 8080 # Port for web server
  1. Visit http://localhost:8080
  2. Enter some message inside chat widget
  3. See error

Versions

# node --version
v14.21.1

Also demo version specified here - https://github.com/bostrot/telegram-support-bot/wiki/Addons#web-chat seems to be not working.

@gituser gituser added the bug label Apr 3, 2023
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

Hello there! As you are a first time Issuer please check whether your issue description is reasonable and complete. If you are having an issue always include the versions you are using (NodeJs, Typescript, ...) as well as a way to reproduce it. Thank you for reading! Now continue :)

@JayDi85
Copy link
Contributor

JayDi85 commented Sep 27, 2023

Fix for a web chat can be found in PR: #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants