diff --git a/package.json b/package.json index 3395db6..b65f36d 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "author": "Etcetera (https://cetera.uk)", "license": "Unlicense", "engines": { - "node": ">=v20" + "node": ">=v21" }, "dependencies": { "@hono/node-server": "^1.8.2", diff --git a/src/server/lib/files.ts b/src/server/lib/files.ts index 9cf3f0a..09b8aef 100644 --- a/src/server/lib/files.ts +++ b/src/server/lib/files.ts @@ -435,7 +435,7 @@ export class UploadStream extends Writable { } delete this.files.locks[this.uploadId!] - await this.files.api.deleteMessages(ogf.messageids) + if (ogf?.messageids) await this.files.api.deleteMessages(ogf.messageids) await this.files.write() if (this.owner) Accounts.files.index(this.owner, this.uploadId!) return this.uploadId