summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-06-18 15:27:13 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-06-18 15:27:13 +0900
commit1331f0b953d7db15a7a12edc00ec20d8bf789d53 (patch)
tree436192e8b9bfb7d6043fb79d9deb48f158f63b5e /src
parentFix #2637 (diff)
downloadsharkey-1331f0b953d7db15a7a12edc00ec20d8bf789d53.tar.gz
sharkey-1331f0b953d7db15a7a12edc00ec20d8bf789d53.tar.bz2
sharkey-1331f0b953d7db15a7a12edc00ec20d8bf789d53.zip
Use WHATWG API
> New application code should use the WHATWG API.
Diffstat (limited to 'src')
-rw-r--r--src/config/load.ts1
-rw-r--r--src/mfm/fromHtml.ts1
-rw-r--r--src/misc/convert-host.ts1
-rw-r--r--src/queue/processors/inbox.ts1
-rw-r--r--src/remote/activitypub/models/person.ts1
-rw-r--r--src/remote/activitypub/request.ts1
-rw-r--r--src/remote/resolve-user.ts1
-rw-r--r--src/remote/webfinger.ts1
8 files changed, 0 insertions, 8 deletions
diff --git a/src/config/load.ts b/src/config/load.ts
index 26b25eab4e..aeed54d74e 100644
--- a/src/config/load.ts
+++ b/src/config/load.ts
@@ -3,7 +3,6 @@
*/
import * as fs from 'fs';
-import { URL } from 'url';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
import * as pkg from '../../package.json';
diff --git a/src/mfm/fromHtml.ts b/src/mfm/fromHtml.ts
index 5fc4a16416..60293b07f7 100644
--- a/src/mfm/fromHtml.ts
+++ b/src/mfm/fromHtml.ts
@@ -1,5 +1,4 @@
import { parseFragment, DefaultTreeDocumentFragment } from 'parse5';
-import { URL } from 'url';
import { urlRegex } from './prelude';
export function fromHtml(html: string): string {
diff --git a/src/misc/convert-host.ts b/src/misc/convert-host.ts
index a5fb15c66f..ad52e12588 100644
--- a/src/misc/convert-host.ts
+++ b/src/misc/convert-host.ts
@@ -1,6 +1,5 @@
import config from '../config';
import { toASCII } from 'punycode';
-import { URL } from 'url';
export function getFullApAccount(username: string, host: string | null) {
return host ? `${username}@${toPuny(host)}` : `${username}@${toPuny(config.host)}`;
diff --git a/src/queue/processors/inbox.ts b/src/queue/processors/inbox.ts
index 21a51c962b..e71181ee73 100644
--- a/src/queue/processors/inbox.ts
+++ b/src/queue/processors/inbox.ts
@@ -3,7 +3,6 @@ import * as httpSignature from 'http-signature';
import { IRemoteUser } from '../../models/entities/user';
import perform from '../../remote/activitypub/perform';
import { resolvePerson, updatePerson } from '../../remote/activitypub/models/person';
-import { URL } from 'url';
import { publishApLogStream } from '../../services/stream';
import Logger from '../../services/logger';
import { registerOrFetchInstanceDoc } from '../../services/register-or-fetch-instance-doc';
diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts
index dcd64e0cd7..bfcad100fe 100644
--- a/src/remote/activitypub/models/person.ts
+++ b/src/remote/activitypub/models/person.ts
@@ -6,7 +6,6 @@ import { resolveImage } from './image';
import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type';
import { DriveFile } from '../../../models/entities/drive-file';
import { fromHtml } from '../../../mfm/fromHtml';
-import { URL } from 'url';
import { resolveNote, extractEmojis } from './note';
import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc';
import { ITag, extractHashtags } from './tag';
diff --git a/src/remote/activitypub/request.ts b/src/remote/activitypub/request.ts
index bde4921c3a..6d18e53281 100644
--- a/src/remote/activitypub/request.ts
+++ b/src/remote/activitypub/request.ts
@@ -1,6 +1,5 @@
import { request } from 'https';
import { sign } from 'http-signature';
-import { URL } from 'url';
import * as crypto from 'crypto';
import { lookup, IRunOptions } from 'lookup-dns-cache';
import * as promiseAny from 'promise-any';
diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts
index 0e2b88f05b..5253d684de 100644
--- a/src/remote/resolve-user.ts
+++ b/src/remote/resolve-user.ts
@@ -1,7 +1,6 @@
import webFinger from './webfinger';
import config from '../config';
import { createPerson, updatePerson } from './activitypub/models/person';
-import { URL } from 'url';
import { remoteLogger } from './logger';
import chalk from 'chalk';
import { User, IRemoteUser } from '../models/entities/user';
diff --git a/src/remote/webfinger.ts b/src/remote/webfinger.ts
index 800673943b..101a31aabb 100644
--- a/src/remote/webfinger.ts
+++ b/src/remote/webfinger.ts
@@ -1,6 +1,5 @@
import config from '../config';
import * as request from 'request-promise-native';
-import { URL } from 'url';
import { query as urlQuery } from '../prelude/url';
type ILink = {