+19
-7
pocket/src/server.rs
+19
-7
pocket/src/server.rs
···
94
94
verifier: TokenVerifier,
95
95
}
96
96
97
+
// app.bsky.actor.getPreferences
98
+
// com.bad-example.pocket.getPreferences
99
+
97
100
#[OpenApi]
98
101
impl Xrpc {
99
102
/// com.bad-example.pocket.getPreferences
100
103
///
101
104
/// get stored bluesky prefs
102
105
#[oai(
103
-
path = "/com.bad-example.pocket.getPreferences",
106
+
path = "/app.bsky.actor.getPreferences",
104
107
method = "get",
105
108
tag = "ApiTags::Pocket"
106
109
)]
···
156
159
#[derive(Debug, Clone, Serialize)]
157
160
struct AppViewDoc {
158
161
id: String,
159
-
service: [AppViewService; 1],
162
+
service: [AppViewService; 2],
160
163
}
161
164
/// Serve a did document for did:web for this to be an xrpc appview
162
165
fn get_did_doc(domain: &str) -> impl Endpoint + use<> {
163
166
let doc = poem::web::Json(AppViewDoc {
164
167
id: format!("did:web:{domain}"),
165
-
service: [AppViewService {
166
-
id: "#pocket_prefs".to_string(),
167
-
r#type: "PocketPreferences".to_string(),
168
-
service_endpoint: format!("https://{domain}"),
169
-
}],
168
+
service: [
169
+
AppViewService {
170
+
id: "#pocket_prefs".to_string(),
171
+
// id: "#bsky_appview".to_string(),
172
+
r#type: "PocketPreferences".to_string(),
173
+
service_endpoint: format!("https://{domain}"),
174
+
},
175
+
AppViewService {
176
+
id: "#bsky_appview".to_string(),
177
+
// id: "#bsky_appview".to_string(),
178
+
r#type: "BlueskyAppview".to_string(),
179
+
service_endpoint: format!("https://{domain}"),
180
+
},
181
+
],
170
182
});
171
183
make_sync(move |_| doc.clone())
172
184
}