use config.url instead of "https://${config.host}"
This commit is contained in:
parent
e74fde8b31
commit
28551c8103
11 changed files with 22 additions and 21 deletions
|
|
@ -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}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue