Add support for rendering media captions (#43)
* Add support for rendering media captions * Run prettier * Deduplicate body props * Add basic test * Fix import order in test * Fix test?
This commit is contained in:
@@ -38,7 +38,9 @@ export function presentableTextForFile(
|
||||
shortened = false,
|
||||
): string {
|
||||
let text = fallbackText;
|
||||
if (content.body?.length) {
|
||||
if (content.filename?.length) {
|
||||
text = content.filename;
|
||||
} else if (content.body?.length) {
|
||||
// The content body should be the name of the file including a
|
||||
// file extension.
|
||||
text = content.body;
|
||||
|
||||
Reference in New Issue
Block a user