Commit graph

138 commits

Author SHA1 Message Date
petersveter108
401995c52e
Websocket client errors as Warns, broken pipe errors as Trace (#656)
* Websocket client errors now logged as Warns
broken pipe errors now logged as Trace

* additional space for broken pipe logs
2021-01-22 13:50:23 -08:00
Gabe Kangas
bda430f791 Cleanup some exported methods 2021-01-01 17:08:20 -08:00
Gabe Kangas
1dc25889ec Add inbound chat event rate limiting. Closes #484 2021-01-01 16:55:46 -08:00
Gabe Kangas
bc4b6895be Fix error message 2020-12-30 12:22:44 -08:00
gingervitis
8a74af202d
Update chat message visibility for moderation (#524)
* update message viz in db

* create admin endpoint to update message visibility

* convert UpdateMessageVisibility api to take in an array of IDs to change visibility on instead

* Support requesting filtered or unfiltered chat messages

* Handle UPDATE chat events on front and backend for toggling messages

* Return entire message with UPDATE events

* Remove the UPDATE message type

* Revert "Remove the UPDATE message type"

This reverts commit 3a83df3d492f7ecf2bab65e845aa2b0365d3a7f6.

* update -> visibility update

* completely remove messages when they turn hidden on VISIBILITY-UPDATEs, and insert them if they turn visible

* Explicitly set visibility

* Fix multi-id sql updates

* increate scroll buffer a bit so chat scrolls when new large messages come in

* Add automated test around chat moderation

* Add new chat admin APIs to api spec

* Commit updated API documentation

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
Co-authored-by: Owncast <owncast@owncast.online>
2020-12-29 13:35:33 -08:00
Gabe Kangas
e558c549d7
Websocket fixes (#461)
* Bump api spec version

* Do not panic on cpu monitoring error

* Centralize the socket disconnect logic and fire it also when socket errors occur. Hopefully closes #421
2020-12-21 19:42:47 -08:00
Gabe Kangas
4d2066a76d
Start cleaning up linter errors. (#358)
* Start cleaning up linter errors. For #357

* Fix unmarshalling NullTime values

* More linter fixes

* Remove commented code

* Move defer up

* Consolidate error check lines

* Move error check to make sure row iteration was successful

* Cleaner error check + do not recreate pipe if it exists

* Consolidate hashing to generate client id
2020-11-14 18:39:53 -08:00
Christian Muehlhaeuser
2e1f8d29b5
Fix godoc style comments (#356) 2020-11-12 15:14:59 -08:00
Christian Muehlhaeuser
8f921fbfde
Fix popular typos (#355) 2020-11-12 14:57:24 -08:00
Christian Muehlhaeuser
cfb031a15c
Make sure we close DB statements to release resources (#354) 2020-11-12 14:46:56 -08:00
Gabe Kangas
4de2841659 Remove stale client purging. Use sockets to count clients. #323 2020-11-05 00:15:00 -08:00
Gabe Kangas
19e86b8c04
First pass at centralized database reference. Closes #282 (#289)
* First pass at centralized database reference. Closes #282

* Add verbose logging option to launch.json

* Clear current broadcaster on stream end. Closes #285

* Fix typo in verbose launch args

* Add support for purging tailwind styles. For #224

* Don't need to pass db as param since it is stored

* Commit updated Javascript packages

Co-authored-by: Owncast <owncast@owncast.online>
2020-10-26 08:55:31 -07:00
Gabe Kangas
7dcc89a841 Add system chat message support to messages query 2020-10-16 17:50:00 -07:00
bitspill
bfbac8cc57
Variable collisions; Possible use of nil value (#256)
* Variable '*' collides with imported package name

* Variable 'error' collides with builtin interface

* '*' may have 'nil' or other unexpected value as its corresponding error variable may be not 'nil'
2020-10-16 15:04:31 -07:00
Gabe Kangas
3812e6345f Fix typo 2020-10-16 13:57:23 -07:00
Gabe Kangas
eb0ee4dd8a Catch db error and show frienlier message. Closes #252 2020-10-15 17:57:32 -07:00
Jannik Volkland
606ccb6c14 Remove message image from go code 2020-10-14 13:47:39 +02:00
Gabe Kangas
d7c3991b59
Render and sanitize chat messages server-side. (#237)
* Render and sanitize chat messages server-side. Closes #235

* Render content.md server-side and return it in the client config

* Remove showdown from web project

* Update api spec

* Move example user content file
2020-10-13 16:45:52 -07:00
Gabe Kangas
d7e355bce1
Connected clients admin API (#217)
* Add support for ending the inbound stream. Closes #191

* Add a simple success response to API requests

* Connected clients API with geo details

* Post-rebase cleanup

* Make setting and reading geo details separate operations to unblock and speed up

* Rename file

* Fire geoip api call behind goroutine

* Add comment

* Post-rebase fixes

* Add support for the MaxMind GeoLite2 GeoIP database
2020-10-06 23:14:33 -07:00
leowmjw
769fc3a561
Fixes #211: Update mod paths (#221)
Co-authored-by: Michael Leow <mleow@moneylion.com>
2020-10-05 10:07:09 -07:00
Gabe Kangas
9b7784634b
First pass at YP registration/configuration (#209)
* Spike: Ping YP service with instance details

* WIP: Add to the config to support YP

* Add YP response endpoint

* Handle YP errors. Use config. Off by default

* Show message about YP support on launch

* Add animated gif preview when generating thumb

* Increase quality of preview gif and only create it if YP is enabled

* Do not allow re-registration by clearing the key

* Make large and small logos actually structured

* Change log level

* Fix default YP service URL

* Point to default hostname

* Set default value for YP to false
2020-10-01 23:55:38 -07:00
Gabe Kangas
b0b5801c5f
Stop storing messages in memory and pull from persistence. Closes #81 (#105) 2020-08-05 21:01:06 -07:00
Gabe Kangas
d9509f5606
Chat updates (#92)
* Send PONG responses to PINGs

* Split out client IDs for viewer counts vs. websocket IDs

* WIP username change event

* Display username changes

* Revert commented out code

* Add support for building from the current branch

* Fix PONG

* Make username changes have a unique ID

* Add a version param to js to cachebust
2020-07-28 21:30:03 -07:00
Gabe Kangas
a7812f8d04 Increase the delay for the welcome chat message a bit 2020-07-20 00:22:32 -07:00
Gabe Kangas
c0e4f647a2 Show chat by default. Closes #72. Show placeholder text that no registration is needed. Closes #73 2020-07-19 15:15:39 -07:00
Gabe Kangas
2855027f22
Use endpoint for chat history instead of websocket (#67)
* Change placeholder when chat is disabled

* Use the /chat endpoint for bulk chat history population instead of websocket. For #47

* Force LiveUI/seek bar during live to show. Closes #11.

* Change pulling chat history into app.js

* Force new messages to have visability = true
2020-07-18 17:27:04 -07:00
Gabe Kangas
a277012650 Limit the backlog of chat messages to recent messages. For #47 2020-07-15 22:06:24 -07:00
Gabe Kangas
a8fe8a1cfa Add support for specifying the path for chat db. Closes #61 2020-07-15 17:20:47 -07:00
Gabe Kangas
8cedf05214 Basic chat persistence for #26 2020-07-12 14:59:40 -07:00
Gabe Kangas
072abf2976 Fix log message 2020-07-12 09:52:54 -07:00
Gabe Kangas
d7a2ffcca4 Add timestamp to messages. For #26 2020-07-11 19:09:01 -07:00
Gabe Kangas
081024569e Another logging tweak 2020-07-06 22:24:55 -07:00
Gabe Kangas
259923b303 Set logging preferences via command line flags. Closes #20 2020-07-06 21:27:31 -07:00
Gabe Kangas
4132cf6d09 Move where the message type is set, and standardize on all caps CHAT 2020-06-24 23:20:19 -07:00
Gabe Kangas
a297e33eff Make IDs for chat messages generated server-side, not client. For #26 2020-06-24 22:00:49 -07:00
Bradley Hilton
abb2f363af
Decouple chat from core and add chat rest api (#25)
* Decouple the chat package from the core

* Add rest api endpoints for the chat aspect
2020-06-23 13:11:01 -07:00
Bradley Hilton
fe96739f60
Fix a memory leak with the chat aspect. (#23)
Essentially, the for loop wasn't being returned out
of and that caused the read listener to never be
let up and released to the gc
2020-06-22 23:52:50 -07:00
Bradley Hilton
487bd12444
Project restructure (#18)
* First pass at restructuring the project; untested but it does compile

* Restructure builds and runs 🎉

* Add the dist folder to the gitignore

* Update core/playlist/monitor.go

* golint and reorganize the monitor.go file

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2020-06-22 18:11:56 -07:00