diff --git a/server-plugins/contact-resources/src/index.ts b/server-plugins/contact-resources/src/index.ts index 41ade59147..dff3b7f524 100644 --- a/server-plugins/contact-resources/src/index.ts +++ b/server-plugins/contact-resources/src/index.ts @@ -50,6 +50,10 @@ export async function OnContactDelete (tx: Tx, { findAll, hierarchy, storageFx } return [] } + if (avatar.includes('://') && !avatar.startsWith('image://')) { + return [] + } + storageFx(async (adapter, bucket) => { await adapter.remove(bucket, [avatar])