mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-15 17:46:55 +00:00
Add test that posts to /pub_msg, test infrastructure
This commit is contained in:
parent
730ce39f72
commit
0be3693c99
6 changed files with 193 additions and 62 deletions
|
@ -64,7 +64,10 @@ func getCacheKey(remoteCommand, data string) string {
|
|||
return fmt.Sprintf("%s/%s", remoteCommand, data)
|
||||
}
|
||||
|
||||
// Publish a message to clients with no caching.
|
||||
// The scope must be specified because no attempt is made to recognize the command.
|
||||
func HBackendPublishRequest(w http.ResponseWriter, r *http.Request) {
|
||||
r.ParseForm()
|
||||
formData, err := UnsealRequest(r.Form)
|
||||
if err != nil {
|
||||
w.WriteHeader(403)
|
||||
|
@ -91,6 +94,7 @@ func HBackendPublishRequest(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
cm := ClientMessage{MessageID: -1, Command: Command(cmd), origArguments: json}
|
||||
cm.parseOrigArguments()
|
||||
var count int
|
||||
|
||||
switch target {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue