[golangci-lint]: Use constant for chat.

errwrp
Martin Dosch 1 year ago
parent 85f2ad7409
commit 5738c9989a
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

@ -20,5 +20,6 @@ const (
nsXMPPStanzas = "urn:ietf:params:xml:ns:xmpp-stanzas"
oxAltBody = "This message is encrypted (XEP-0373: OpenPGP for XMPP)."
pubsubPubOptions = "http://jabber.org/protocol/pubsub#publish-options"
strGroupchat = "groupchat"
strChat = "chat"
strGroupchat = "groupchat"
)

@ -404,7 +404,7 @@ func main() {
}
var msgType string
msgType = "chat"
msgType = strChat
if *flagChatroom {
msgType = strGroupchat
// Join the MUCs.
@ -487,7 +487,7 @@ func main() {
}
var bareFrom string
switch v.Type {
case "chat":
case strChat:
bareFrom = strings.Split(v.Remote, "/")[0]
case strGroupchat:
bareFrom = v.Remote
@ -519,7 +519,7 @@ func main() {
}
var bareFrom string
switch v.Type {
case "chat":
case strChat:
bareFrom = strings.Split(v.Remote, "/")[0]
case strGroupchat:
bareFrom = v.Remote

Loading…
Cancel
Save