From a15871560f80e07386c1dabb8370cd2664ecfd1f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Jan 2020 16:56:52 +0100 Subject: Move to eslint --- server/helpers/activitypub.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/helpers/activitypub.ts') diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 9f9e8fba7..22f8550ca 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts @@ -5,7 +5,7 @@ import { Activity } from '../../shared/models/activitypub' import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants' import { signJsonLDObject } from './peertube-crypto' import { pageToStartAndCount } from './core-utils' -import { parse } from 'url' +import { URL } from 'url' import { MActor, MVideoAccountLight } from '../typings/models' function activityPubContextify (data: T) { @@ -161,8 +161,8 @@ function getAPId (activity: string | { id: string }) { } function checkUrlsSameHost (url1: string, url2: string) { - const idHost = parse(url1).host - const actorHost = parse(url2).host + const idHost = new URL(url1).host + const actorHost = new URL(url2).host return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase() } -- cgit v1.2.3