fedimbed.bluesky: inline post content into header since itll never be over 4000"
This commit is contained in:
		
							parent
							
								
									d1d14f8fd4
								
							
						
					
					
						commit
						19b1bdcbbe
					
				
					 1 changed files with 7 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -575,8 +575,13 @@ async function bluesky(msg, url, spoiler = false) {
 | 
			
		|||
    components: [
 | 
			
		||||
      {
 | 
			
		||||
        type: 10,
 | 
			
		||||
        content:
 | 
			
		||||
          `${context}\n## ${post.author.displayName}\n[@${post.author.handle}](https://bsky.app/profile/${post.author.did})`.trim(),
 | 
			
		||||
        content: `${context}\n## ${post.author.displayName}\n[@${post.author.handle}](https://bsky.app/profile/${
 | 
			
		||||
          post.author.did
 | 
			
		||||
        })\n${
 | 
			
		||||
          post.record.facets?.length ?? 0 > 0
 | 
			
		||||
            ? processBlueskyFacets(post.record.text, post.record.facets)
 | 
			
		||||
            : post.record.text
 | 
			
		||||
        }`.trim(),
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
    accessory: {
 | 
			
		||||
| 
						 | 
				
			
			@ -588,15 +593,6 @@ async function bluesky(msg, url, spoiler = false) {
 | 
			
		|||
  };
 | 
			
		||||
  container.components.push(header);
 | 
			
		||||
 | 
			
		||||
  const postContent = {
 | 
			
		||||
    type: 10,
 | 
			
		||||
    content:
 | 
			
		||||
      post.record.facets?.length ?? 0 > 0
 | 
			
		||||
        ? processBlueskyFacets(post.record.text, post.record.facets)
 | 
			
		||||
        : post.record.text,
 | 
			
		||||
  };
 | 
			
		||||
  container.components.push(postContent);
 | 
			
		||||
 | 
			
		||||
  const footer = {
 | 
			
		||||
    type: 10,
 | 
			
		||||
    content: `${getStatsBluesky(post)}\n-# Bluesky \u2022 <t:${Math.floor(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue