fedimbed.bluesky: fix cid for recordWithMedia (copypaste moment)
This commit is contained in:
		
							parent
							
								
									8f732b49bf
								
							
						
					
					
						commit
						ce341409fb
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -166,7 +166,7 @@ async function blueskyQuoteEmbed(quote) {
 | 
			
		|||
        } else if (embed.media.$type === "app.bsky.embed.video#view") {
 | 
			
		||||
          const lookup = await fetch(`https://plc.directory/${quote.author.did}`).then((res) => res.json());
 | 
			
		||||
          const domain = lookup.service.find((service) => service.id === "#atproto_pds").serviceEndpoint;
 | 
			
		||||
          const videoUrl = `${domain}/xrpc/com.atproto.sync.getBlob?did=${quote.author.did}&cid=${embed.cid}`;
 | 
			
		||||
          const videoUrl = `${domain}/xrpc/com.atproto.sync.getBlob?did=${quote.author.did}&cid=${embed.media.cid}`;
 | 
			
		||||
 | 
			
		||||
          const contentType = await fetch(videoUrl, {
 | 
			
		||||
            method: "HEAD",
 | 
			
		||||
| 
						 | 
				
			
			@ -283,7 +283,7 @@ async function bluesky(msg, url, spoiler = false) {
 | 
			
		|||
        } else if (post.embed.media.$type === "app.bsky.embed.video#view") {
 | 
			
		||||
          const lookup = await fetch(`https://plc.directory/${post.author.did}`).then((res) => res.json());
 | 
			
		||||
          const domain = lookup.service.find((service) => service.id === "#atproto_pds").serviceEndpoint;
 | 
			
		||||
          const videoUrl = `${domain}/xrpc/com.atproto.sync.getBlob?did=${post.author.did}&cid=${post.embed.cid}`;
 | 
			
		||||
          const videoUrl = `${domain}/xrpc/com.atproto.sync.getBlob?did=${post.author.did}&cid=${post.embed.media.cid}`;
 | 
			
		||||
 | 
			
		||||
          const contentType = await fetch(videoUrl, {
 | 
			
		||||
            method: "HEAD",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue