From 29f248d8b06f062d5fe552da09a59b91d67118f5 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 5 Dec 2021 21:17:29 +0300 Subject: Make the default feeds' UIDs pretty! --- src/micropub/post.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/micropub') diff --git a/src/micropub/post.rs b/src/micropub/post.rs index 6906dc0..def518a 100644 --- a/src/micropub/post.rs +++ b/src/micropub/post.rs @@ -298,12 +298,12 @@ async fn create_feed( // Note to Future Vika: DO NOT CONVERT THIS TO A MATCH BLOCK // It will get treated as a binding instead of a const // See `rustc --explain E0530` for more info - let (name, slug) = if path == DEFAULT_CHANNEL_PATH { - (DEFAULT_CHANNEL_NAME, "main") + let name = if path == DEFAULT_CHANNEL_PATH { + DEFAULT_CHANNEL_NAME } else if path == CONTACTS_CHANNEL_PATH { - (CONTACTS_CHANNEL_NAME, "vcards") + CONTACTS_CHANNEL_NAME } else if path == FOOD_CHANNEL_PATH { - (FOOD_CHANNEL_NAME, "food") + FOOD_CHANNEL_NAME } else { panic!("Tried to create an unknown default feed!") }; @@ -313,7 +313,7 @@ async fn create_feed( "type": ["h-feed"], "properties": { "name": [name], - "mp-slug": [slug], + "uid": [channel] }, "children": [uid] }), -- cgit 1.4.1