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

How to use web chat #154

Open
Maxhem2 opened this issue Jul 16, 2023 · 8 comments
Open

How to use web chat #154

Maxhem2 opened this issue Jul 16, 2023 · 8 comments
Labels

Comments

@Maxhem2
Copy link

Maxhem2 commented Jul 16, 2023

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

@Maxhem2 Maxhem2 added the bug label Jul 16, 2023
@bostrot
Copy link
Owner

bostrot commented Jul 22, 2023

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

@Maxhem2
Copy link
Author

Maxhem2 commented Jul 22, 2023

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

@bostrot
Copy link
Owner

bostrot commented Jul 22, 2023

Did you adjust the snippet accordingly?
What settings?

Yes the server where it was running is no more.

@Maxhem2
Copy link
Author

Maxhem2 commented Jul 22, 2023

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>

@bostrot
Copy link
Owner

bostrot commented Jul 22, 2023

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

@Maxhem2
Copy link
Author

Maxhem2 commented Jul 22, 2023

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

@Maxhem2
Copy link
Author

Maxhem2 commented Jul 27, 2023

bump

@JayDi85
Copy link
Contributor

JayDi85 commented Sep 27, 2023

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

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

No branches or pull requests

3 participants