Check-in [b9af445709]
Logged in as anonymous
Overview
Comment:consolidate and clarify
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b9af445709f44406a03b0599aaba5c7bdaf2e3ade157da0075f34e56db193f36
User & Date: arcade on 2026-07-31 15:42:49.197
Other Links: manifest | tags
Context
2026-08-01
09:06
remove lazy_static check-in: 997fb1cff4 user: arcade tags: trunk
2026-07-31
15:53
bumps, fixes, tests - quinn-proto: https://rustsec.org/advisories/RUSTSEC-2026-0185 Remote memory exhaustion in quinn-proto from unbounded out-of-order stream reassembly - serde_with: https://github.com/jonasbb/serde_with/security/advisories/GHSA-7gcf-g7xr-8hxj KeyValueMap serialization panics on empty sequence or map entries Bad or attacker controlled values could cause a panic while allocating too large values. - html tags are now case insensitive - error propagation and handling fixes - more tests, convert to lib+bin check-in: f4660639ca user: arcade tags: release, v0.6.6
15:42
consolidate and clarify check-in: b9af445709 user: arcade tags: trunk
15:21
make get_id public and add some tests for it check-in: e45c7e529b user: arcade tags: trunk
Changes
24
25
26
27
28
29
30
31

32

33
34



35
36
37


38
39
40


41
42

43
44
45
46
47
48
49
24
25
26
27
28
29
30

31
32
33


34
35
36



37
38



39
40


41





42
43







-
+

+
-
-
+
+
+
-
-
-
+
+
-
-
-
+
+
-
-
+
-
-
-
-
-


		"#, config::FileFormat::Toml))
		.build()
		.stack()?;
	MailServer::new(settings)
}

#[test]
fn get_id_returns_configured_recipient_for_full_address () -> Result<()> {
fn get_id_returns_configured_recipient () -> Result<()> {
	let server = build_server()?;
	let cases = [
	assert_eq!(*server.get_id("someone@example.com")?, ChatPeerId::from(1));
	Ok(())
		("someone@example.com", 1),
		("someone", 0),
		("root", -1),
}

#[test]
		("unknown@example.com", 0),
	];
fn get_id_returns_configured_recipient_for_bare_name () -> Result<()> {
	let server = build_server()?;
	assert_eq!(*server.get_id("root")?, ChatPeerId::from(-1));
	for (email, id) in cases {
		assert_eq!(*server.get_id(email)?, ChatPeerId::from(id), "email [{email}] expected to return id [{id}]");
	Ok(())
}
	}

#[test]
fn get_id_falls_back_to_default_for_unknown_address () -> Result<()> {
	let server = build_server()?;
	assert_eq!(*server.get_id("unknown@example.com")?, ChatPeerId::from(0));
	Ok(())
}