Make text spoilers work on Android
This commit is contained in:
		
							parent
							
								
									cd5a501307
								
							
						
					
					
						commit
						083f7bd9ba
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -107,7 +107,7 @@ async function attachmentToEvent(mentions, attachment) {
 | 
				
			||||||
			msgtype: "m.text",
 | 
								msgtype: "m.text",
 | 
				
			||||||
			body: `${emoji} Uploaded SPOILER file: ${attachment.url} (${pb(attachment.size)})`,
 | 
								body: `${emoji} Uploaded SPOILER file: ${attachment.url} (${pb(attachment.size)})`,
 | 
				
			||||||
			format: "org.matrix.custom.html",
 | 
								format: "org.matrix.custom.html",
 | 
				
			||||||
			formatted_body: `<blockquote>${emoji} Uploaded SPOILER file: <a href="${attachment.url}"><span data-mx-spoiler>${attachment.url}</span></a> (${pb(attachment.size)})</blockquote>`
 | 
								formatted_body: `<blockquote>${emoji} Uploaded SPOILER file: <a href="${attachment.url}">${attachment.url}</a> (${pb(attachment.size)})</blockquote>`
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	// for large files, always link them instead of uploading so I don't use up all the space in the content repo
 | 
						// for large files, always link them instead of uploading so I don't use up all the space in the content repo
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -176,7 +176,7 @@ test("message2event: spoiler attachment", async t => {
 | 
				
			||||||
		msgtype: "m.text",
 | 
							msgtype: "m.text",
 | 
				
			||||||
		body: "📄 Uploaded SPOILER file: https://cdn.discordapp.com/attachments/1100319550446252084/1147465564307079258/SPOILER_69-GNDP-CADENCE.nfs.gci (74 KB)",
 | 
							body: "📄 Uploaded SPOILER file: https://cdn.discordapp.com/attachments/1100319550446252084/1147465564307079258/SPOILER_69-GNDP-CADENCE.nfs.gci (74 KB)",
 | 
				
			||||||
		format: "org.matrix.custom.html",
 | 
							format: "org.matrix.custom.html",
 | 
				
			||||||
		formatted_body: "<blockquote>📄 Uploaded SPOILER file: <span data-mx-spoiler><a href=\"https://cdn.discordapp.com/attachments/1100319550446252084/1147465564307079258/SPOILER_69-GNDP-CADENCE.nfs.gci\">View</a></span> (74 KB)</blockquote>"
 | 
							formatted_body: "<blockquote>📄 Uploaded SPOILER file: <a href=\"https://cdn.discordapp.com/attachments/1100319550446252084/1147465564307079258/SPOILER_69-GNDP-CADENCE.nfs.gci\">https://cdn.discordapp.com/attachments/1100319550446252084/1147465564307079258/SPOILER_69-GNDP-CADENCE.nfs.gci</a> (74 KB)</blockquote>"
 | 
				
			||||||
	}])
 | 
						}])
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue