Merge pull request #970 from AustinKelsay/bugfix-crosspost-link-context
Add context field to crossposted link if present
This commit is contained in:
		
						commit
						59b0027ad0
					
				@ -24,10 +24,17 @@ async function discussionToEvent (item) {
 | 
			
		||||
async function linkToEvent (item) {
 | 
			
		||||
  const createdAt = Math.floor(Date.now() / 1000)
 | 
			
		||||
 | 
			
		||||
  let contentField
 | 
			
		||||
  if (item.text) {
 | 
			
		||||
    contentField = `${item.title}\n${item.url}\n\n${item.text}`
 | 
			
		||||
  } else {
 | 
			
		||||
    contentField = `${item.title}\n${item.url}`
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return {
 | 
			
		||||
    created_at: createdAt,
 | 
			
		||||
    kind: 1,
 | 
			
		||||
    content: `${item.title} \n ${item.url}`,
 | 
			
		||||
    content: contentField,
 | 
			
		||||
    tags: []
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user