Skip to content

Commit 0c9c1ab

Browse files
committed
fix: Update how private file urls are detected
1 parent 3991343 commit 0c9c1ab

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/notion-client/src/notion-api.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,17 @@ export class NotionAPI {
237237
// console.log(block, source)
238238

239239
if (source) {
240-
if (!source.includes('secure.notion-static.com')) {
241-
return []
240+
if (source.includes('secure.notion-static.com') || source.includes('prod-files-secure')) {
241+
return {
242+
permissionRecord: {
243+
table: 'block',
244+
id: block.id
245+
},
246+
url: source
247+
};
242248
}
243249

244-
return {
245-
permissionRecord: {
246-
table: 'block',
247-
id: block.id
248-
},
249-
url: source
250-
}
250+
return []
251251
}
252252
}
253253

0 commit comments

Comments
 (0)