mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-02 16:08:31 +00:00
Use username= and authenticated=
This commit is contained in:
parent
286488891e
commit
bbe8b41fed
3 changed files with 20 additions and 20 deletions
|
@ -140,16 +140,16 @@ func SendRemoteCommandCached(remoteCommand, data string, auth AuthInfo) (string,
|
|||
// `usernameClaimed` depending on whether AuthInfo.UsernameValidates is true is AuthInfo.TwitchUsername.
|
||||
func SendRemoteCommand(remoteCommand, data string, auth AuthInfo) (responseStr string, err error) {
|
||||
destURL := fmt.Sprintf("%s/cmd/%s", backendURL, remoteCommand)
|
||||
var authKey string
|
||||
if auth.UsernameValidated {
|
||||
authKey = "usernameVerified"
|
||||
} else {
|
||||
authKey = "usernameClaimed"
|
||||
}
|
||||
|
||||
formData := url.Values{
|
||||
"clientData": []string{data},
|
||||
authKey: []string{auth.TwitchUsername},
|
||||
"username": []string{auth.TwitchUsername},
|
||||
}
|
||||
|
||||
if auth.UsernameValidated {
|
||||
formData.Set("authenticated", "1")
|
||||
} else {
|
||||
formData.Set("authenticated", "0")
|
||||
}
|
||||
|
||||
sealedForm, err := SealRequest(formData)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue