@social-mail/social-mail-web-server 1.4.716 → 1.4.718
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/services/files/SnapshotService.d.ts.map +1 -1
- package/dist/server/services/files/SnapshotService.js +6 -2
- package/dist/server/services/files/SnapshotService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/services/files/SnapshotService.ts +6 -2
package/package.json
CHANGED
|
@@ -252,7 +252,11 @@ export default class SnapshotService {
|
|
|
252
252
|
try {
|
|
253
253
|
const file = await this.db.appFiles
|
|
254
254
|
.where({ fileID }, (p) => (x) => x.appFileID === p.fileID)
|
|
255
|
-
.
|
|
255
|
+
.first();
|
|
256
|
+
if (!file) {
|
|
257
|
+
console.warn(`File not found for "${fileID}"`);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
256
260
|
const [ ignore , ... fileIDs] = file.path.split("/").filter((x) => x) as any[];
|
|
257
261
|
const files = await this.db.appFiles
|
|
258
262
|
.where({ fileIDs }, (p) => (x) => x.appFileID in p.fileIDs)
|
|
@@ -290,7 +294,7 @@ export default class SnapshotService {
|
|
|
290
294
|
return;
|
|
291
295
|
}
|
|
292
296
|
|
|
293
|
-
if (/^((https?\:\/\/)|(data
|
|
297
|
+
if (/^((https?\:\/\/)|(data\:)|(\/\/))/i.test(link)) {
|
|
294
298
|
return;
|
|
295
299
|
}
|
|
296
300
|
|