From 2788e7c8e4058cf3f252af7f51ad3c4f2d45cc07 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 13 Oct 2023 14:38:50 +0300 Subject: [PATCH] Remove unnecessary mdtest method It was only used for testing race conditions in sending code, but those don't happen anymore --- mdtest/main.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/mdtest/main.go b/mdtest/main.go index 20db6f2d..fb2bd392 100644 --- a/mdtest/main.go +++ b/mdtest/main.go @@ -570,35 +570,6 @@ func handleCmd(cmd string, args []string) { } else { log.Infof("Message sent (server timestamp: %s)", resp.Timestamp) } - case "multisend": - if len(args) < 3 { - log.Errorf("Usage: multisend -- ") - return - } - var recipients []types.JID - for len(args) > 0 && args[0] != "--" { - recipient, ok := parseJID(args[0]) - args = args[1:] - if !ok { - return - } - recipients = append(recipients, recipient) - } - if len(args) == 0 { - log.Errorf("Usage: multisend -- (the -- is required)") - return - } - msg := &waProto.Message{Conversation: proto.String(strings.Join(args[1:], " "))} - for _, recipient := range recipients { - go func(recipient types.JID) { - resp, err := cli.SendMessage(context.Background(), recipient, msg) - if err != nil { - log.Errorf("Error sending message to %s: %v", recipient, err) - } else { - log.Infof("Message sent to %s (server timestamp: %s)", recipient, resp.Timestamp) - } - }(recipient) - } case "react": if len(args) < 3 { log.Errorf("Usage: react ")