An ATproto social media client -- with an independent Appview.

Use proxy for fetching link meta (#716)

* Use proxy for fetching link meta

* Remove link meta test due to hitting proxy

* setup different staging and prod proxy URLs

---------

Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>

authored by

Ollie H
Ansh Nanda
Paul Frazee
and committed by
GitHub
c0ca27b7 20185585

+36 -122
-1
package.json
··· 85 85 "expo-updates": "~0.16.4", 86 86 "fast-text-encoding": "^1.0.6", 87 87 "graphemer": "^1.4.0", 88 - "he": "^1.2.0", 89 88 "history": "^5.3.0", 90 89 "js-sha256": "^0.9.0", 91 90 "lande": "^1.0.10",
+15
src/lib/constants.ts
··· 144 144 height: 2000, 145 145 size: 1000000, 146 146 } 147 + 148 + export const STAGING_LINK_META_PROXY = 149 + 'https://cardyb.staging.bsky.dev/v1/extract?url=' 150 + 151 + export const PROD_LINK_META_PROXY = 'https://cardyb.bsky.app/v1/extract?url=' 152 + 153 + export function LINK_META_PROXY(serviceUrl: string) { 154 + if (serviceUrl.includes('localhost')) { 155 + return STAGING_LINK_META_PROXY 156 + } else if (serviceUrl.includes('staging')) { 157 + return STAGING_LINK_META_PROXY 158 + } else { 159 + return PROD_LINK_META_PROXY 160 + } 161 + }