···
/// com.bad-example.pocket.getPreferences
/// get stored bluesky prefs
-
path = "/com.bad-example.pocket.getPreferences",
···
#[derive(Debug, Clone, Serialize)]
-
service: [AppViewService; 1],
/// Serve a did document for did:web for this to be an xrpc appview
fn get_did_doc(domain: &str) -> impl Endpoint + use<> {
let doc = poem::web::Json(AppViewDoc {
id: format!("did:web:{domain}"),
-
service: [AppViewService {
-
id: "#pocket_prefs".to_string(),
-
r#type: "PocketPreferences".to_string(),
-
service_endpoint: format!("https://{domain}"),
make_sync(move |_| doc.clone())
···
+
// app.bsky.actor.getPreferences
+
// com.bad-example.pocket.getPreferences
/// com.bad-example.pocket.getPreferences
/// get stored bluesky prefs
+
path = "/app.bsky.actor.getPreferences",
···
#[derive(Debug, Clone, Serialize)]
+
service: [AppViewService; 2],
/// Serve a did document for did:web for this to be an xrpc appview
fn get_did_doc(domain: &str) -> impl Endpoint + use<> {
let doc = poem::web::Json(AppViewDoc {
id: format!("did:web:{domain}"),
+
id: "#pocket_prefs".to_string(),
+
// id: "#bsky_appview".to_string(),
+
r#type: "PocketPreferences".to_string(),
+
service_endpoint: format!("https://{domain}"),
+
id: "#bsky_appview".to_string(),
+
// id: "#bsky_appview".to_string(),
+
r#type: "BlueskyAppview".to_string(),
+
service_endpoint: format!("https://{domain}"),
make_sync(move |_| doc.clone())