From fb1b94789c0952d89604923c40f5c8a82835dc0c Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sat, 5 Oct 2024 15:33:14 +0200 Subject: [PATCH] Revert "[gocritic]: Improve code quality." This reverts commit b2714d05822953535f6cb3cbaf496144b71ce9af. --- processStanzas.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/processStanzas.go b/processStanzas.go index 3d0ac9f..eb002ea 100644 --- a/processStanzas.go +++ b/processStanzas.go @@ -190,25 +190,6 @@ func processStanzas(client *xmpp.Client, muc string, mucNick string, feeds []str log.Fatal("Error: Failed sending message to ", v.Remote, ": ", err) } } - default: - reply := `Unknown command, type "help" for a list of supported commands.` - if v.Type == "groupchat" { - _, err = client.Send(xmpp.Chat{ - Remote: muc, - Type: "groupchat", Text: strings.Split(v.Remote, "/")[1] + ": " + reply, - }) - if err != nil { - log.Fatal("Error: Failed sending message to MUC:", err) - } - } else if v.Type == "chat" { - _, err = client.Send(xmpp.Chat{ - Remote: v.Remote, - Type: "chat", Text: reply, - }) - if err != nil { - log.Fatal("Error: Failed sending message to ", v.Remote, ": ", err) - } - } } // Reply to pings and disco queries.