Trimmed quotes from RumbleChat args
This commit is contained in:
parent
5b3593ec1e
commit
a779afcaba
8
chat.go
8
chat.go
|
@ -132,7 +132,7 @@ func parseRumbleChatArgs(argsS string) []string {
|
|||
arg := []rune{}
|
||||
for _, c := range argsS {
|
||||
if c == ',' && open == 0 {
|
||||
args = append(args, strings.TrimSpace(string(arg)))
|
||||
args = append(args, trimRumbleChatArg(string(arg)))
|
||||
arg = []rune{}
|
||||
} else {
|
||||
if c == '[' {
|
||||
|
@ -146,12 +146,16 @@ func parseRumbleChatArgs(argsS string) []string {
|
|||
}
|
||||
}
|
||||
if len(arg) > 0 {
|
||||
args = append(args, strings.TrimSpace(string(arg)))
|
||||
args = append(args, trimRumbleChatArg(string(arg)))
|
||||
}
|
||||
|
||||
return args
|
||||
}
|
||||
|
||||
func trimRumbleChatArg(arg string) string {
|
||||
return strings.Trim(strings.TrimSpace(arg), "\"")
|
||||
}
|
||||
|
||||
type ChatMessage struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue