Parakeet is a Rust-based Bluesky AppServer aiming to implement most of the functionality required to support the Bluesky client
appview atproto bluesky rust appserver
66
fork

Configure Feed

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

fix: properly return sig in Labels

Mia db77d0d8 8b5c5f97

+17 -2
+1
Cargo.lock
··· 2656 2656 "async-recursion", 2657 2657 "axum", 2658 2658 "axum-extra", 2659 + "base64 0.22.1", 2659 2660 "chrono", 2660 2661 "dataloader", 2661 2662 "deadpool",
+1 -1
lexica/src/com_atproto/label.rs
··· 145 145 #[serde(skip_serializing_if = "Option::is_none")] 146 146 pub exp: Option<NaiveDateTime>, 147 147 #[serde(skip_serializing_if = "Option::is_none")] 148 - pub sig: Option<Vec<u8>>, 148 + pub sig: Option<crate::JsonBytes>, 149 149 }
+8
lexica/src/lib.rs
··· 1 + use serde::Serialize; 2 + 1 3 pub mod app_bsky; 2 4 pub mod com_atproto; 5 + 6 + #[derive(Clone, Debug, Serialize)] 7 + pub struct JsonBytes { 8 + #[serde(rename = "$bytes")] 9 + pub bytes: String, 10 + }
+1
parakeet/Cargo.toml
··· 7 7 async-recursion = "1.1.1" 8 8 axum = { version = "0.8", features = ["json"] } 9 9 axum-extra = { version = "0.10.0", features = ["query", "typed-header"] } 10 + base64 = "0.22" 10 11 chrono = { version = "0.4.39", features = ["serde"] } 11 12 dataloader = { path = "../dataloader-rs", default-features = false, features = ["runtime-tokio"] } 12 13 deadpool = { version = "0.12.1", features = ["managed"] }
+6 -1
parakeet/src/hydration/mod.rs
··· 3 3 use crate::loaders::Dataloaders; 4 4 use crate::xrpc::cdn::BskyCdn; 5 5 use crate::xrpc::extract::LabelConfigItem; 6 + use base64::{prelude::BASE64_STANDARD, Engine}; 6 7 use std::collections::HashMap; 7 8 use std::sync::Arc; 8 9 ··· 17 18 pub use profile::*; 18 19 19 20 fn db_to_atp_label(input: parakeet_db::models::Label) -> lexica::com_atproto::label::Label { 21 + let sig = input.sig.map(|sig| lexica::JsonBytes { 22 + bytes: BASE64_STANDARD.encode(&sig), 23 + }); 24 + 20 25 lexica::com_atproto::label::Label { 21 26 ver: 1, 22 27 src: input.labeler, ··· 25 30 val: input.label, 26 31 cts: input.created_at, 27 32 exp: input.expires, 28 - sig: input.sig, 33 + sig, 29 34 } 30 35 } 31 36