diff --git a/plugins/notion/server/notion.ts b/plugins/notion/server/notion.ts
index f2bf11d170..22a7783517 100644
--- a/plugins/notion/server/notion.ts
+++ b/plugins/notion/server/notion.ts
@@ -13,9 +13,11 @@ import {
RichTextItemResponse,
} from "@notionhq/client/build/src/api-endpoints";
import { RateLimit } from "async-sema";
+import emojiRegex from "emoji-regex";
import compact from "lodash/compact";
import { z } from "zod";
import { Second } from "@shared/utils/time";
+import { isUrl } from "@shared/utils/urls";
import { NotionUtils } from "../shared/NotionUtils";
import { Block, Page, PageType } from "../shared/types";
import env from "./env";
@@ -37,7 +39,16 @@ const AccessTokenResponseSchema = z.object({
bot_id: z.string(),
workspace_id: z.string(),
workspace_name: z.string().nullish(),
- workspace_icon: z.string().url().nullish(),
+ workspace_icon: z
+ .string()
+ .nullish()
+ .transform((val) => {
+ const emojiRegexp = emojiRegex();
+ if (val && (isUrl(val) || emojiRegexp.test(val))) {
+ return val;
+ }
+ return undefined;
+ }),
});
export class NotionClient {
diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json
index 8fbf8b128e..69080e8369 100644
--- a/shared/i18n/locales/en_US/translation.json
+++ b/shared/i18n/locales/en_US/translation.json
@@ -520,7 +520,6 @@
"Groups": "Groups",
"Shared Links": "Shared Links",
"Import": "Import",
- "Self Hosted": "Self Hosted",
"Integrations": "Integrations",
"Revoke token": "Revoke token",
"Revoke": "Revoke",
@@ -1045,10 +1044,6 @@
"Allow editors to create new collections within the workspace": "Allow editors to create new collections within the workspace",
"Workspace creation": "Workspace creation",
"Allow editors to create new workspaces": "Allow editors to create new workspaces",
- "Draw.io deployment": "Draw.io deployment",
- "Add your self-hosted draw.io installation url here to enable automatic embedding of diagrams within documents.": "Add your self-hosted draw.io installation url here to enable automatic embedding of diagrams within documents.",
- "Grist deployment": "Grist deployment",
- "Add your self-hosted grist installation URL here.": "Add your self-hosted grist installation URL here.",
"Could not load shares": "Could not load shares",
"Sharing is currently disabled.": "Sharing is currently disabled.",
"You can globally enable and disable public document sharing in the security settings.": "You can globally enable and disable public document sharing in the security settings.",