owncast/controllers/admin
Ruffy 9c484efd36
Feature/oc 1316 add support for system message to single user (#1351)
* add public func to lookup a ChatClient by its clientId

* add facility to send a system message directly to a user

* add clientId field to UserEvent

* implement simple http endpoint to send a message to a user

* let mux handle new directSystemMessageToUser endpoint

* add ClientId to UserEvents across the codebase

* render body of system-message to client

* add clientId to Chat-Message

* add tests showing how url-parsing should work

* add simple rest endpoint helpers for parameter-parsing and easy routing

* use newly added rest-endpoint helper to rout to Client-Messaging controller

* use safe "ReadRestUrlParameter" to parse ClientId

* remove empty HandleFunc in router

* set Header directly to prevent built-in (platform-dependent) canonicalization to kick in

* fix typo in "Parameter" message

* remove debug-logging of HTTP headers in REST-helpers

* convert to uint32 to prevent overruns when converting to wraptype uint later on

* resolve linter-ouchies

* resolve linter potential nil-deref warning

* document the SendSystemMessageToClient endpoint in swaggerdoc

* remove clientId assignment causing potential nil dereference in userDisabledEvent-case

as the clientId isn't relevant here anyway

* make findClientById private, so its not accessible outside of core/chat

* remove redundant string type hint

* Update PR based on linter requirements

Co-authored-by: Raffael Rehberger <raffael@rtrace.io>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2021-09-13 01:26:28 -07:00
..
chat.go Feature/oc 1316 add support for system message to single user (#1351) 2021-09-13 01:26:28 -07:00
config.go Expanded linting + fix warnings (#1396) 2021-09-12 00:18:15 -07:00
connectedClients.go Clarify in routes and names that it is chat clients being returned 2021-07-21 17:19:15 -07:00
disconnect.go
externalAPIUsers.go Chat refactor + persistent backing chat users (#1163) 2021-07-19 19:22:29 -07:00
hardware.go Start cleaning up linter errors. (#358) 2020-11-14 18:39:53 -08:00
index.go change admin 404 error log level to debug (#1342) 2021-08-21 18:16:27 -07:00
logs.go style fix for error checking (#1170) 2021-07-09 11:16:44 -07:00
serverConfig.go Chat refactor + persistent backing chat users (#1163) 2021-07-19 19:22:29 -07:00
status.go 0.0.6 -> Master (#731) 2021-02-18 23:05:52 -08:00
viewers.go Start cleaning up linter errors. (#358) 2020-11-14 18:39:53 -08:00
webhooks.go 0.0.6 -> Master (#731) 2021-02-18 23:05:52 -08:00
yp.go 0.0.6 -> Master (#731) 2021-02-18 23:05:52 -08:00