fix whatsapp

This commit is contained in:
LPF
2026-03-10 00:00:01 +08:00
parent 938e762c6b
commit e9a47ac02a
7 changed files with 384 additions and 52 deletions

View File

@@ -53,6 +53,16 @@ func TestBridgeStatusURL(t *testing.T) {
}
}
func TestBridgeStatusURLWithNestedPath(t *testing.T) {
got, err := BridgeStatusURL("ws://localhost:7788/whatsapp/ws")
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if got != "http://localhost:7788/whatsapp/status" {
t.Fatalf("got %q", got)
}
}
func TestNormalizeWhatsAppRecipientJID(t *testing.T) {
tests := []struct {
input string