mirror of
https://github.com/outline/outline.git
synced 2026-11-30 17:10:36 +03:00
Re-insert removed comments and fix parseTitle usage
This commit is contained in:
1 parent
ea5c190b44
commit
4b23d774b6
1 file changed
+5
@@ -164,6 +164,7 @@ export class NotionClient {
|
||||
cursor = response.next_cursor ?? undefined;
|
||||
}
|
||||
|
||||
// Recursive fetch when direct children have their own children.
|
||||
await Promise.all(
|
||||
blocks.map(async (block) => {
|
||||
if (
|
||||
@@ -268,12 +269,15 @@ export class NotionClient {
|
||||
return user.name;
|
||||
}
|
||||
|
||||
// bot belongs to a user, get the user's name.
|
||||
if (user.bot.owner.type === "user" && isFullUser(user.bot.owner.user)) {
|
||||
return user.bot.owner.user.name;
|
||||
}
|
||||
|
||||
// bot belongs to a workspace, fallback to bot's name.
|
||||
return user.name;
|
||||
} catch (error) {
|
||||
// Handle the case where a user can't be found
|
||||
if (
|
||||
error instanceof APIResponseError &&
|
||||
error.code === APIErrorCode.ObjectNotFound
|
||||
@@ -309,6 +313,7 @@ export class NotionClient {
|
||||
}
|
||||
|
||||
private parseEmoji(item: PageObjectResponse | DatabaseObjectResponse) {
|
||||
// Other icon types return a url to download from, which we don't support.
|
||||
return item.icon?.type === "emoji" ? item.icon.emoji : undefined;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user