Thread viewer for Bluesky

allow connecting to a custom lycan host

Changed files
+9 -5
+9 -5
private_search_page.js
··· 42 43 let params = new URLSearchParams(location.search); 44 this.mode = params.get('mode'); 45 - this.lycanMode = params.get('lycan'); 46 47 - if (this.lycanMode == 'local') { 48 this.localLycan = new BlueskyAPI('http://localhost:3000', false); 49 } 50 } 51 ··· 136 return await this.localLycan.getRequest('blue.feeds.lycan.getImportStatus', { user: accountAPI.user.did }); 137 } else { 138 return await accountAPI.getRequest('blue.feeds.lycan.getImportStatus', null, { 139 - headers: { 'atproto-proxy': 'did:web:lycan.feeds.blue#lycan' } 140 }); 141 } 142 } ··· 244 }); 245 } else { 246 await accountAPI.postRequest('blue.feeds.lycan.startImport', null, { 247 - headers: { 'atproto-proxy': 'did:web:lycan.feeds.blue#lycan' } 248 }); 249 } 250 ··· 358 if (cursor) params.cursor = cursor; 359 360 response = await accountAPI.getRequest('blue.feeds.lycan.searchPosts', params, { 361 - headers: { 'atproto-proxy': 'did:web:lycan.feeds.blue#lycan' } 362 }); 363 } 364
··· 42 43 let params = new URLSearchParams(location.search); 44 this.mode = params.get('mode'); 45 + let lycan = params.get('lycan'); 46 47 + if (lycan == 'local') { 48 this.localLycan = new BlueskyAPI('http://localhost:3000', false); 49 + } else if (lycan) { 50 + this.lycanAddress = `did:web:${lycan}#lycan`; 51 + } else { 52 + this.lycanAddress = 'did:web:lycan.feeds.blue#lycan'; 53 } 54 } 55 ··· 140 return await this.localLycan.getRequest('blue.feeds.lycan.getImportStatus', { user: accountAPI.user.did }); 141 } else { 142 return await accountAPI.getRequest('blue.feeds.lycan.getImportStatus', null, { 143 + headers: { 'atproto-proxy': this.lycanAddress } 144 }); 145 } 146 } ··· 248 }); 249 } else { 250 await accountAPI.postRequest('blue.feeds.lycan.startImport', null, { 251 + headers: { 'atproto-proxy': this.lycanAddress } 252 }); 253 } 254 ··· 362 if (cursor) params.cursor = cursor; 363 364 response = await accountAPI.getRequest('blue.feeds.lycan.searchPosts', params, { 365 + headers: { 'atproto-proxy': this.lycanAddress } 366 }); 367 } 368