1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-02 11:20:56 +00:00

Handle multichat in single-publish

This commit is contained in:
Kane York 2015-11-08 22:01:32 -08:00
parent 4f3473e8d9
commit a4ecc790b9
2 changed files with 6 additions and 6 deletions

View file

@ -99,7 +99,7 @@ func HBackendPublishRequest(w http.ResponseWriter, r *http.Request) {
case MsgTargetTypeChat:
count = PublishToChat(channel, cm)
case MsgTargetTypeMultichat:
// TODO
count = PublishToMultiple(strings.Split(channel, ","), cm)
case MsgTargetTypeGlobal:
count = PublishToAll(cm)
case MsgTargetTypeInvalid:
@ -119,15 +119,15 @@ func (bfe BackendForwardedError) Error() string {
var AuthorizationNeededError = errors.New("Must authenticate Twitch username to use this command")
func RequestRemoteDataCached(remoteCommand, data string, auth AuthInfo) (string, error) {
func SendRemoteCommandCached(remoteCommand, data string, auth AuthInfo) (string, error) {
cached, ok := responseCache.Get(getCacheKey(remoteCommand, data))
if ok {
return cached.(string), nil
}
return RequestRemoteData(remoteCommand, data, auth)
return SendRemoteCommand(remoteCommand, data, auth)
}
func RequestRemoteData(remoteCommand, data string, auth AuthInfo) (responseStr string, err error) {
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 {