bostrot/telegram-support-bot

How to use web chat

Maxhem2 opened this issue · 8 comments

How do I use https://github.com/bostrot/telegram-support-bot/wiki/Addons#web-chat
The example website does not show a working chat and it wont work for my website

What steps have you done so far to set it up?

What steps have you done so far to set it up?

I have changed the yaml config to the settings described and added the snippet to my website. But foremost even the example website does not seem to have it working

Did you adjust the snippet accordingly?
What settings?

Yes the server where it was running is no more.

These settings in the yaml config

web_server: true # Enable/disable web server
web_server_port: 8080 # Port for web server

and in the script I replaced the localhost with my servers ip address and then pasted it into my existing html file
<script src="localhost:8080/chat.js"></script>

Can you check that your server is reachable?(access localhost:8080/chat.js in your browser)

localhost:8080/chat.

It shows

// on window load
window.addEventListener('load', function() {
  const frame = document.createElement('iframe');
  frame.style = 'width: 580px; height: 400px; border: none;' +
    'position: fixed; bottom: 0; right: 0;';
  frame.scroll = 'no';
  frame.src = document.getElementById('chatScript').src.replace('/chat.js', '');
  document.body.appendChild(frame);
});

bump

@Maxhem2 just open http://localhost:8080/ to see a sample web page with workable chat