Skip to content

Commit f1c40af

Browse files
authored
fix: shorten the name of audio attachment files (#2930)
1 parent f3ce24c commit f1c40af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package/src/utils/getTrimmedAttachmentTitle.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const getTrimmedAttachmentTitle = (title?: string) => {
88
const lastIndexOfDot = title.lastIndexOf('.');
99
return title.length < 12 ? title : title.slice(0, 12) + '...' + title.slice(lastIndexOfDot);
1010
} else {
11-
return title;
11+
// shorten title
12+
return title.length < 20 ? title : title.slice(0, 20) + '...';
1213
}
1314
};

0 commit comments

Comments
 (0)