summaryrefslogtreecommitdiff
path: root/packages/frontend/src/utility
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-05-21 08:27:23 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-05-21 08:27:23 -0400
commit28551c810309c69c8cc58fbc254507e705e8fa05 (patch)
treeb15a06ddf1d2c17a73e082d83c33a58f8b2dc645 /packages/frontend/src/utility
parentoptimize extractUrlFromMfm (diff)
downloadsharkey-28551c810309c69c8cc58fbc254507e705e8fa05.tar.gz
sharkey-28551c810309c69c8cc58fbc254507e705e8fa05.tar.bz2
sharkey-28551c810309c69c8cc58fbc254507e705e8fa05.zip
use config.url instead of "https://${config.host}"
Diffstat (limited to 'packages/frontend/src/utility')
-rw-r--r--packages/frontend/src/utility/extract-preview-urls.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/utility/extract-preview-urls.ts b/packages/frontend/src/utility/extract-preview-urls.ts
index e14ed68f27..dd066df888 100644
--- a/packages/frontend/src/utility/extract-preview-urls.ts
+++ b/packages/frontend/src/utility/extract-preview-urls.ts
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-import { host } from '@@/js/config.js';
+import * as config from '@@/js/config.js';
import type * as Misskey from 'misskey-js';
import type * as mfm from '@transfem-org/sfm-js';
import { extractUrlFromMfm } from '@/utility/extract-url-from-mfm.js';
@@ -18,15 +18,15 @@ export function extractPreviewUrls(note: Misskey.entities.Note, contents: mfm.Mf
url !== note.url &&
url !== note.uri &&
// Local note
- url !== `https://${host}/notes/${note.id}` &&
+ url !== `${config.url}/notes/${note.id}` &&
// Remote renote or quote
url !== note.renote?.url &&
url !== note.renote?.uri &&
// Local renote or quote
- url !== `https://${host}/notes/${note.renote?.id}` &&
+ url !== `${config.url}/notes/${note.renote?.id}` &&
// Remote renote *of* a quote
url !== note.renote?.renote?.url &&
url !== note.renote?.renote?.uri &&
// Local renote *of* a quote
- url !== `https://${host}/notes/${note.renote?.renote?.id}`);
+ url !== `${config.url}/notes/${note.renote?.renote?.id}`);
}