code-cleanup
Martin Dosch 2 years ago
parent 8f55ce80bc
commit 9c07ca6814

@ -337,7 +337,10 @@ func main() {
reg := regexp.MustCompile(`[\x{0000}-\x{0008}\x{000B}\x{000C}\x{000E}-\x{001F}]`)
message = reg.ReplaceAllString(message, "")
var msgType string
msgType = "chat"
if *flagChatroom {
msgType = "groupchat"
// Join the MUCs.
for _, recipient := range recipients {
if *flagMUCPassword != "" {
@ -384,7 +387,7 @@ func main() {
}
default:
_, err = client.Send(xmpp.Chat{Remote: recipient.Jid,
Type: "chat", Text: message})
Type: msgType, Text: message})
if err != nil {
log.Fatal(err)
}
@ -420,12 +423,6 @@ func main() {
}
}
default:
var msgType string
if *flagChatroom {
msgType = "groupchat"
} else {
msgType = "chat"
}
for _, recipient := range recipients {
switch {
case *flagHttpUpload != "":

Loading…
Cancel
Save