summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-08-19 21:55:45 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-08-19 21:55:45 +0900
commit42cc93dd0f189995f29fc87d2734fc809105a7cf (patch)
tree7a74658a76d71d4c07bf89a7028fa1786af0e13e /src/remote/activitypub/renderer
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadmisskey-42cc93dd0f189995f29fc87d2734fc809105a7cf.tar.gz
misskey-42cc93dd0f189995f29fc87d2734fc809105a7cf.tar.bz2
misskey-42cc93dd0f189995f29fc87d2734fc809105a7cf.zip
fix: mochaが動かないため拡張子なしに戻した
Diffstat (limited to 'src/remote/activitypub/renderer')
-rw-r--r--src/remote/activitypub/renderer/accept.ts4
-rw-r--r--src/remote/activitypub/renderer/add.ts4
-rw-r--r--src/remote/activitypub/renderer/announce.ts4
-rw-r--r--src/remote/activitypub/renderer/block.ts4
-rw-r--r--src/remote/activitypub/renderer/create.ts4
-rw-r--r--src/remote/activitypub/renderer/delete.ts4
-rw-r--r--src/remote/activitypub/renderer/document.ts4
-rw-r--r--src/remote/activitypub/renderer/emoji.ts4
-rw-r--r--src/remote/activitypub/renderer/follow-relay.ts6
-rw-r--r--src/remote/activitypub/renderer/follow-user.ts6
-rw-r--r--src/remote/activitypub/renderer/follow.ts6
-rw-r--r--src/remote/activitypub/renderer/hashtag.ts2
-rw-r--r--src/remote/activitypub/renderer/image.ts4
-rw-r--r--src/remote/activitypub/renderer/index.ts10
-rw-r--r--src/remote/activitypub/renderer/key.ts6
-rw-r--r--src/remote/activitypub/renderer/like.ts10
-rw-r--r--src/remote/activitypub/renderer/mention.ts6
-rw-r--r--src/remote/activitypub/renderer/note.ts22
-rw-r--r--src/remote/activitypub/renderer/person.ts22
-rw-r--r--src/remote/activitypub/renderer/question.ts8
-rw-r--r--src/remote/activitypub/renderer/read.ts6
-rw-r--r--src/remote/activitypub/renderer/reject.ts4
-rw-r--r--src/remote/activitypub/renderer/remove.ts4
-rw-r--r--src/remote/activitypub/renderer/undo.ts4
-rw-r--r--src/remote/activitypub/renderer/update.ts4
-rw-r--r--src/remote/activitypub/renderer/vote.ts10
26 files changed, 86 insertions, 86 deletions
diff --git a/src/remote/activitypub/renderer/accept.ts b/src/remote/activitypub/renderer/accept.ts
index f1037e95f2..f1e61f4c6a 100644
--- a/src/remote/activitypub/renderer/accept.ts
+++ b/src/remote/activitypub/renderer/accept.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
export default (object: any, user: { id: User['id']; host: null }) => ({
type: 'Accept',
diff --git a/src/remote/activitypub/renderer/add.ts b/src/remote/activitypub/renderer/add.ts
index fce541bcdc..21414a9380 100644
--- a/src/remote/activitypub/renderer/add.ts
+++ b/src/remote/activitypub/renderer/add.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { ILocalUser } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { ILocalUser } from '@/models/entities/user';
export default (user: ILocalUser, target: any, object: any) => ({
type: 'Add',
diff --git a/src/remote/activitypub/renderer/announce.ts b/src/remote/activitypub/renderer/announce.ts
index dfbe4714c9..7bf90922be 100644
--- a/src/remote/activitypub/renderer/announce.ts
+++ b/src/remote/activitypub/renderer/announce.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { Note } from '@/models/entities/note.js';
+import config from '@/config/index';
+import { Note } from '@/models/entities/note';
export default (object: any, note: Note) => {
const attributedTo = `${config.url}/users/${note.userId}`;
diff --git a/src/remote/activitypub/renderer/block.ts b/src/remote/activitypub/renderer/block.ts
index 4e9102e6f0..bb3d74295a 100644
--- a/src/remote/activitypub/renderer/block.ts
+++ b/src/remote/activitypub/renderer/block.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { ILocalUser, IRemoteUser } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { ILocalUser, IRemoteUser } from '@/models/entities/user';
export default (blocker: ILocalUser, blockee: IRemoteUser) => ({
type: 'Block',
diff --git a/src/remote/activitypub/renderer/create.ts b/src/remote/activitypub/renderer/create.ts
index 103ce4bfd5..04aa993a91 100644
--- a/src/remote/activitypub/renderer/create.ts
+++ b/src/remote/activitypub/renderer/create.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { Note } from '@/models/entities/note.js';
+import config from '@/config/index';
+import { Note } from '@/models/entities/note';
export default (object: any, note: Note) => {
const activity = {
diff --git a/src/remote/activitypub/renderer/delete.ts b/src/remote/activitypub/renderer/delete.ts
index 159a486e08..83b27fa866 100644
--- a/src/remote/activitypub/renderer/delete.ts
+++ b/src/remote/activitypub/renderer/delete.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
export default (object: any, user: { id: User['id']; host: null }) => ({
type: 'Delete',
diff --git a/src/remote/activitypub/renderer/document.ts b/src/remote/activitypub/renderer/document.ts
index c973de4c4c..a9d86dea15 100644
--- a/src/remote/activitypub/renderer/document.ts
+++ b/src/remote/activitypub/renderer/document.ts
@@ -1,5 +1,5 @@
-import { DriveFile } from '@/models/entities/drive-file.js';
-import { DriveFiles } from '@/models/index.js';
+import { DriveFile } from '@/models/entities/drive-file';
+import { DriveFiles } from '@/models/index';
export default (file: DriveFile) => ({
type: 'Document',
diff --git a/src/remote/activitypub/renderer/emoji.ts b/src/remote/activitypub/renderer/emoji.ts
index a58c0c1ad9..ca514c56b5 100644
--- a/src/remote/activitypub/renderer/emoji.ts
+++ b/src/remote/activitypub/renderer/emoji.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { Emoji } from '@/models/entities/emoji.js';
+import config from '@/config/index';
+import { Emoji } from '@/models/entities/emoji';
export default (emoji: Emoji) => ({
id: `${config.url}/emojis/${emoji.name}`,
diff --git a/src/remote/activitypub/renderer/follow-relay.ts b/src/remote/activitypub/renderer/follow-relay.ts
index 4340b70537..984c3c7639 100644
--- a/src/remote/activitypub/renderer/follow-relay.ts
+++ b/src/remote/activitypub/renderer/follow-relay.ts
@@ -1,6 +1,6 @@
-import config from '@/config/index.js';
-import { Relay } from '@/models/entities/relay.js';
-import { ILocalUser } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { Relay } from '@/models/entities/relay';
+import { ILocalUser } from '@/models/entities/user';
export function renderFollowRelay(relay: Relay, relayActor: ILocalUser) {
const follow = {
diff --git a/src/remote/activitypub/renderer/follow-user.ts b/src/remote/activitypub/renderer/follow-user.ts
index ad1d63b933..e3dde7f7fe 100644
--- a/src/remote/activitypub/renderer/follow-user.ts
+++ b/src/remote/activitypub/renderer/follow-user.ts
@@ -1,6 +1,6 @@
-import config from '@/config/index.js';
-import { Users } from '@/models/index.js';
-import { User } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { Users } from '@/models/index';
+import { User } from '@/models/entities/user';
/**
* Convert (local|remote)(Follower|Followee)ID to URL
diff --git a/src/remote/activitypub/renderer/follow.ts b/src/remote/activitypub/renderer/follow.ts
index 9f80bf829b..c8a7946799 100644
--- a/src/remote/activitypub/renderer/follow.ts
+++ b/src/remote/activitypub/renderer/follow.ts
@@ -1,6 +1,6 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
-import { Users } from '@/models/index.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
+import { Users } from '@/models/index';
export default (follower: { id: User['id']; host: User['host']; uri: User['host'] }, followee: { id: User['id']; host: User['host']; uri: User['host'] }, requestId?: string) => {
const follow = {
diff --git a/src/remote/activitypub/renderer/hashtag.ts b/src/remote/activitypub/renderer/hashtag.ts
index faa0efe924..290c74c7fe 100644
--- a/src/remote/activitypub/renderer/hashtag.ts
+++ b/src/remote/activitypub/renderer/hashtag.ts
@@ -1,4 +1,4 @@
-import config from '@/config/index.js';
+import config from '@/config/index';
export default (tag: string) => ({
type: 'Hashtag',
diff --git a/src/remote/activitypub/renderer/image.ts b/src/remote/activitypub/renderer/image.ts
index 6440248a4a..0cb3d6ed65 100644
--- a/src/remote/activitypub/renderer/image.ts
+++ b/src/remote/activitypub/renderer/image.ts
@@ -1,5 +1,5 @@
-import { DriveFile } from '@/models/entities/drive-file.js';
-import { DriveFiles } from '@/models/index.js';
+import { DriveFile } from '@/models/entities/drive-file';
+import { DriveFiles } from '@/models/index';
export default (file: DriveFile) => ({
type: 'Image',
diff --git a/src/remote/activitypub/renderer/index.ts b/src/remote/activitypub/renderer/index.ts
index 5ab5b1cdbe..f6ec6583d0 100644
--- a/src/remote/activitypub/renderer/index.ts
+++ b/src/remote/activitypub/renderer/index.ts
@@ -1,9 +1,9 @@
-import config from '@/config/index.js';
+import config from '@/config/index';
import { v4 as uuid } from 'uuid';
-import { IActivity } from '../type.js';
-import { LdSignature } from '../misc/ld-signature.js';
-import { getUserKeypair } from '@/misc/keypair-store.js';
-import { User } from '@/models/entities/user.js';
+import { IActivity } from '../type';
+import { LdSignature } from '../misc/ld-signature';
+import { getUserKeypair } from '@/misc/keypair-store';
+import { User } from '@/models/entities/user';
export const renderActivity = (x: any): IActivity | null => {
if (x == null) return null;
diff --git a/src/remote/activitypub/renderer/key.ts b/src/remote/activitypub/renderer/key.ts
index 4db1d83262..992f98d79a 100644
--- a/src/remote/activitypub/renderer/key.ts
+++ b/src/remote/activitypub/renderer/key.ts
@@ -1,6 +1,6 @@
-import config from '@/config/index.js';
-import { ILocalUser } from '@/models/entities/user.js';
-import { UserKeypair } from '@/models/entities/user-keypair.js';
+import config from '@/config/index';
+import { ILocalUser } from '@/models/entities/user';
+import { UserKeypair } from '@/models/entities/user-keypair';
import { createPublicKey } from 'crypto';
export default (user: ILocalUser, key: UserKeypair, postfix?: string) => ({
diff --git a/src/remote/activitypub/renderer/like.ts b/src/remote/activitypub/renderer/like.ts
index 6ec0bfb034..a7e79a176f 100644
--- a/src/remote/activitypub/renderer/like.ts
+++ b/src/remote/activitypub/renderer/like.ts
@@ -1,8 +1,8 @@
-import config from '@/config/index.js';
-import { NoteReaction } from '@/models/entities/note-reaction.js';
-import { Note } from '@/models/entities/note.js';
-import { Emojis } from '@/models/index.js';
-import renderEmoji from './emoji.js';
+import config from '@/config/index';
+import { NoteReaction } from '@/models/entities/note-reaction';
+import { Note } from '@/models/entities/note';
+import { Emojis } from '@/models/index';
+import renderEmoji from './emoji';
export const renderLike = async (noteReaction: NoteReaction, note: Note) => {
const reaction = noteReaction.reaction;
diff --git a/src/remote/activitypub/renderer/mention.ts b/src/remote/activitypub/renderer/mention.ts
index c7e62e8840..06d2d33e59 100644
--- a/src/remote/activitypub/renderer/mention.ts
+++ b/src/remote/activitypub/renderer/mention.ts
@@ -1,6 +1,6 @@
-import config from '@/config/index.js';
-import { User, ILocalUser } from '@/models/entities/user.js';
-import { Users } from '@/models/index.js';
+import config from '@/config/index';
+import { User, ILocalUser } from '@/models/entities/user';
+import { Users } from '@/models/index';
export default (mention: User) => ({
type: 'Mention',
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index 0f4513fca7..84a1786784 100644
--- a/src/remote/activitypub/renderer/note.ts
+++ b/src/remote/activitypub/renderer/note.ts
@@ -1,15 +1,15 @@
-import renderDocument from './document.js';
-import renderHashtag from './hashtag.js';
-import renderMention from './mention.js';
-import renderEmoji from './emoji.js';
-import config from '@/config/index.js';
-import toHtml from '../misc/get-note-html.js';
-import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js';
-import { DriveFile } from '@/models/entities/drive-file.js';
-import { DriveFiles, Notes, Users, Emojis, Polls } from '@/models/index.js';
+import renderDocument from './document';
+import renderHashtag from './hashtag';
+import renderMention from './mention';
+import renderEmoji from './emoji';
+import config from '@/config/index';
+import toHtml from '../misc/get-note-html';
+import { Note, IMentionedRemoteUsers } from '@/models/entities/note';
+import { DriveFile } from '@/models/entities/drive-file';
+import { DriveFiles, Notes, Users, Emojis, Polls } from '@/models/index';
import { In } from 'typeorm';
-import { Emoji } from '@/models/entities/emoji.js';
-import { Poll } from '@/models/entities/poll.js';
+import { Emoji } from '@/models/entities/emoji';
+import { Poll } from '@/models/entities/poll';
export default async function renderNote(note: Note, dive = true, isTalk = false): Promise<any> {
const getPromisedFiles = async (ids: string[]) => {
diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts
index edcb68ef6a..f2a283a870 100644
--- a/src/remote/activitypub/renderer/person.ts
+++ b/src/remote/activitypub/renderer/person.ts
@@ -1,16 +1,16 @@
import { URL } from 'url';
import * as mfm from 'mfm-js';
-import renderImage from './image.js';
-import renderKey from './key.js';
-import config from '@/config/index.js';
-import { ILocalUser } from '@/models/entities/user.js';
-import { toHtml } from '../../../mfm/to-html.js';
-import { getEmojis } from './note.js';
-import renderEmoji from './emoji.js';
-import { IIdentifier } from '../models/identifier.js';
-import renderHashtag from './hashtag.js';
-import { DriveFiles, UserProfiles } from '@/models/index.js';
-import { getUserKeypair } from '@/misc/keypair-store.js';
+import renderImage from './image';
+import renderKey from './key';
+import config from '@/config/index';
+import { ILocalUser } from '@/models/entities/user';
+import { toHtml } from '../../../mfm/to-html';
+import { getEmojis } from './note';
+import renderEmoji from './emoji';
+import { IIdentifier } from '../models/identifier';
+import renderHashtag from './hashtag';
+import { DriveFiles, UserProfiles } from '@/models/index';
+import { getUserKeypair } from '@/misc/keypair-store';
export async function renderPerson(user: ILocalUser) {
const id = `${config.url}/users/${user.id}`;
diff --git a/src/remote/activitypub/renderer/question.ts b/src/remote/activitypub/renderer/question.ts
index 388398a7d8..246d599bab 100644
--- a/src/remote/activitypub/renderer/question.ts
+++ b/src/remote/activitypub/renderer/question.ts
@@ -1,7 +1,7 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
-import { Note } from '@/models/entities/note.js';
-import { Poll } from '@/models/entities/poll.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
+import { Note } from '@/models/entities/note';
+import { Poll } from '@/models/entities/poll';
export default async function renderQuestion(user: { id: User['id'] }, note: Note, poll: Poll) {
const question = {
diff --git a/src/remote/activitypub/renderer/read.ts b/src/remote/activitypub/renderer/read.ts
index 39a852fcb5..95357f64d3 100644
--- a/src/remote/activitypub/renderer/read.ts
+++ b/src/remote/activitypub/renderer/read.ts
@@ -1,6 +1,6 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
-import { MessagingMessage } from '@/models/entities/messaging-message.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
+import { MessagingMessage } from '@/models/entities/messaging-message';
export const renderReadActivity = (user: { id: User['id'] }, message: MessagingMessage) => ({
type: 'Read',
diff --git a/src/remote/activitypub/renderer/reject.ts b/src/remote/activitypub/renderer/reject.ts
index 474b67d680..42beffecf2 100644
--- a/src/remote/activitypub/renderer/reject.ts
+++ b/src/remote/activitypub/renderer/reject.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
export default (object: any, user: { id: User['id'] }) => ({
type: 'Reject',
diff --git a/src/remote/activitypub/renderer/remove.ts b/src/remote/activitypub/renderer/remove.ts
index 1f6bc19404..79d60edbaa 100644
--- a/src/remote/activitypub/renderer/remove.ts
+++ b/src/remote/activitypub/renderer/remove.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
export default (user: { id: User['id'] }, target: any, object: any) => ({
type: 'Remove',
diff --git a/src/remote/activitypub/renderer/undo.ts b/src/remote/activitypub/renderer/undo.ts
index 968d59fae6..f9082ffdfc 100644
--- a/src/remote/activitypub/renderer/undo.ts
+++ b/src/remote/activitypub/renderer/undo.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { ILocalUser, User } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { ILocalUser, User } from '@/models/entities/user';
export default (object: any, user: { id: User['id'] }) => {
if (object == null) return null;
diff --git a/src/remote/activitypub/renderer/update.ts b/src/remote/activitypub/renderer/update.ts
index c696a9c34b..d9a8149af3 100644
--- a/src/remote/activitypub/renderer/update.ts
+++ b/src/remote/activitypub/renderer/update.ts
@@ -1,5 +1,5 @@
-import config from '@/config/index.js';
-import { User } from '@/models/entities/user.js';
+import config from '@/config/index';
+import { User } from '@/models/entities/user';
export default (object: any, user: { id: User['id'] }) => {
const activity = {
diff --git a/src/remote/activitypub/renderer/vote.ts b/src/remote/activitypub/renderer/vote.ts
index 201845a189..ff038070f7 100644
--- a/src/remote/activitypub/renderer/vote.ts
+++ b/src/remote/activitypub/renderer/vote.ts
@@ -1,8 +1,8 @@
-import config from '@/config/index.js';
-import { Note } from '@/models/entities/note.js';
-import { IRemoteUser, User } from '@/models/entities/user.js';
-import { PollVote } from '@/models/entities/poll-vote.js';
-import { Poll } from '@/models/entities/poll.js';
+import config from '@/config/index';
+import { Note } from '@/models/entities/note';
+import { IRemoteUser, User } from '@/models/entities/user';
+import { PollVote } from '@/models/entities/poll-vote';
+import { Poll } from '@/models/entities/poll';
export default async function renderVote(user: { id: User['id'] }, vote: PollVote, note: Note, poll: Poll, pollOwner: IRemoteUser): Promise<any> {
return {