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

no message in chat #1

Open
ElFDA opened this issue Aug 8, 2023 · 1 comment
Open

no message in chat #1

ElFDA opened this issue Aug 8, 2023 · 1 comment

Comments

@ElFDA
Copy link

ElFDA commented Aug 8, 2023

Hello and thank for your work
I'm playing with your bot and it's all perfect except the chat messages not delivered
I created the access token and if I send a test message with curl it works
Added the browser on obs on http://ipoftheserver:8080/bot.html
Renamed and configured config.json and commands.json
If I sent !fart command I can hear the mp3 I added to the media dir, I see the overlay on the OBS overlay but no "ewww" chat messages :(
Where I'm wrong?
Using Owncast 0.1.1

@teklynk
Copy link
Owner

teklynk commented Sep 11, 2023

@ElFDA
Sorry. This issue fell off my radar.

I think the issue you are experiencing is due to CORS. The owncast server may need to allow Access-Control-Allow-Headers since the localhost server is trying to send a post request to the owncast server but it gets blocked. The "say" object is the only part that tries to send something to the owncast server which is why everything else works but "say".

If your owncast server is behind a reverse proxy you can try adding Access-Control-Allow-Headers for all outside requests.

NGINX

add_header Access-Control-Allow-Headers "*" always;

APACHE

Access-Control-Allow-Origin:*

Another way around the issue is to host the chat bot files on the owncast server. I believe the latest version of owncast has a public folder for things like this. https://yourowncastserver/public/owncast_bot/bot.html
This will make it so that the requests come from the same domain name and will not have a CORS issue.
More info about adding files to the owncast server:
https://owncast.online/docs/custom-assets/

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

No branches or pull requests

2 participants