Generate mediaName for backed-up attachments
This commit is contained in:
parent
db623d13b2
commit
cf381cd46c
4 changed files with 171 additions and 2 deletions
|
@ -28,7 +28,7 @@ import type { ProcessedAttachment } from './Types.d';
|
|||
import type { WebAPIType } from './WebAPI';
|
||||
import { createName, getRelativePath } from '../windows/attachments';
|
||||
|
||||
function getCdn(attachment: ProcessedAttachment) {
|
||||
export function getCdn(attachment: ProcessedAttachment): string {
|
||||
const { cdnId, cdnKey } = attachment;
|
||||
const cdn = cdnId || cdnKey;
|
||||
strictAssert(cdn, 'Attachment was missing cdnId or cdnKey');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue