Update main.go

This commit is contained in:
Руслан 2023-10-16 05:21:10 +06:00 committed by GitHub
parent 29047c94fb
commit 4c330c00e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ var (
) )
const ( const (
version = "1.0.2" version = "1.0.3"
cyan = "\033[1;36m" cyan = "\033[1;36m"
reset = "\033[0m" reset = "\033[0m"
) )
@ -204,7 +204,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
userAgent := r.UserAgent() userAgent := r.UserAgent()
if strings.HasPrefix(userAgent, "curl") { if strings.HasPrefix(userAgent, "curl") || idStr == "plain" {
if text, ok := message.Text.(string); ok { if text, ok := message.Text.(string); ok {
writePlainTextResponse(w, text, id) writePlainTextResponse(w, text, id)
} else { } else {