The smokesignal.events web application
56
fork

Configure Feed

Select the types of activity you want to include in your feed.

feature: host-meta file for templated links

+26
+23
src/http/handle_host_meta.rs
··· 1 + use axum::Json; 2 + use serde_json::json; 3 + 4 + pub(super) async fn handle_host_meta() -> Json<serde_json::Value> { 5 + Json(json!({ 6 + "links": [ 7 + { 8 + "rel": "https://hopper.at/rel/link", 9 + "template": "https://smokesignal.events/{authority}/{rkey}", 10 + "properties": { 11 + "https://atproto.com/ns/collection": "community.lexicon.calendar.event" 12 + } 13 + }, 14 + { 15 + "rel": "https://hopper.at/rel/link", 16 + "template": "https://smokesignal.events/{authority}", 17 + "properties": { 18 + "https://atproto.com/ns/collection": "events.smokesignal.profile" 19 + } 20 + } 21 + ] 22 + })) 23 + }
+1
src/http/mod.rs
··· 22 22 pub mod handle_export_ics; 23 23 pub mod handle_export_rsvps; 24 24 pub mod handle_health; 25 + pub mod handle_host_meta; 25 26 pub mod handle_import; 26 27 pub mod handle_index; 27 28 pub mod handle_oauth_aip_callback;
+2
src/http/server.rs
··· 41 41 handle_export_ics::handle_export_ics, 42 42 handle_export_rsvps::handle_export_rsvps, 43 43 handle_health::{handle_alive, handle_ready, handle_started}, 44 + handle_host_meta::handle_host_meta, 44 45 handle_import::{handle_import, handle_import_submit}, 45 46 handle_index::handle_index, 46 47 handle_oauth_logout::handle_logout, ··· 85 86 .route("/cookie-policy", get(handle_cookie_policy)) 86 87 .route("/acknowledgement", get(handle_acknowledgement)) 87 88 .route("/.well-known/did.json", get(handle_wellknown_did_web)) 89 + .route("/asdasd", get(handle_host_meta)) 88 90 .route("/_ready", get(handle_ready)) 89 91 .route("/_alive", get(handle_alive)) 90 92 .route("/_started", get(handle_started))