fedimbed: copypaste moment
This commit is contained in:
		
							parent
							
								
									94bd7c28a7
								
							
						
					
					
						commit
						bd7ade61d3
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -86,7 +86,7 @@ async function processUrl(msg, url) {
 | 
				
			||||||
  if (rawPostData.startsWith("{")) {
 | 
					  if (rawPostData.startsWith("{")) {
 | 
				
			||||||
    postData = JSON.parse(rawPostData);
 | 
					    postData = JSON.parse(rawPostData);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    logger.error("fedimbed", `Got non-JSON for "${url}": ${rawPostData}`);
 | 
					    logger.warn("fedimbed", `Got non-JSON for "${url}": ${rawPostData}`);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (postData?.error) {
 | 
					  if (postData?.error) {
 | 
				
			||||||
| 
						 | 
					@ -141,7 +141,7 @@ async function processUrl(msg, url) {
 | 
				
			||||||
          url: postData2.account.url,
 | 
					          url: postData2.account.url,
 | 
				
			||||||
          avatar: postData2.account.avatar,
 | 
					          avatar: postData2.account.avatar,
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        for (const attachment of postData.media_attachments) {
 | 
					        for (const attachment of postData2.media_attachments) {
 | 
				
			||||||
          attachments.push({
 | 
					          attachments.push({
 | 
				
			||||||
            url: attachment.url,
 | 
					            url: attachment.url,
 | 
				
			||||||
            desc: attachment.description,
 | 
					            desc: attachment.description,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue