Fix remove contact with gravatar/color (#2542)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-01-25 19:42:55 +06:00 committed by GitHub
parent d1cb89c5de
commit 2707c34659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,10 @@ export async function OnContactDelete (tx: Tx, { findAll, hierarchy, storageFx }
return [] return []
} }
if (avatar.includes('://') && !avatar.startsWith('image://')) {
return []
}
storageFx(async (adapter, bucket) => { storageFx(async (adapter, bucket) => {
await adapter.remove(bucket, [avatar]) await adapter.remove(bucket, [avatar])