fix: accept existing handles with trailing underscores

This commit is contained in:
2026-10-12 00:01:36 +02:00
parent 6563a3d38a
commit 0d69d050ee
3 changed files with 32 additions and 3 deletions
+1 -1
View File
@@ -877,7 +877,7 @@ mod tests {
#[test]
fn channel_handles_require_the_requested_identity_and_a_valid_handle() {
let id = "UChAQQ9at2MDlXjvQX3vL3Yw";
for handle in ["@ch.1676", "@敷嶋てとら"] {
for handle in ["@ch.1676", "@敷嶋てとら", "@hontame_"] {
let metadata = serde_json::json!({"channel_id": id, "uploader_id": handle}).to_string();
assert_eq!(channel_handle(&metadata, id).unwrap(), handle);
assert!(channel_handle(&metadata, "UCaYhcUwRBNscFNUKTjgPFiA").is_err());