MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestExtractThreadInfoReplyToMultiAddress

Function TestExtractThreadInfoReplyToMultiAddress

internal/relay/server_test.go:100–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestExtractThreadInfoReplyToMultiAddress(t *testing.T) {
101 // RFC 5322 § 3.6.2 permits Reply-To to carry multiple addresses; SDK
102 // consumers receive the full list so they can fan replies out themselves.
103 raw := []byte("Message-Id: <x@example.com>\r\nSubject: Hi\r\n" +
104 "From: notifications@mail.example.com\r\n" +
105 "Reply-To: \"Alice\" <alice@example.com>, ceo@company.com\r\n" +
106 "To: bot@agent.example.com\r\n\r\nBody\r\n")
107
108 info := extractThreadInfo(raw)
109
110 want := []string{"alice@example.com", "ceo@company.com"}
111 if !reflect.DeepEqual(info.ReplyTo, want) {
112 t.Errorf("ReplyTo = %v, want %v", info.ReplyTo, want)
113 }
114}
115
116func TestExtractThreadInfoToCcLists(t *testing.T) {
117 raw := []byte("Message-Id: <m@gmail.com>\r\nSubject: Group\r\nFrom: alice@example.com\r\n" +

Callers

nothing calls this directly

Calls 1

extractThreadInfoFunction · 0.85

Tested by

no test coverage detected