fix: mochaが動かないため拡張子なしに戻した
This commit is contained in:
parent
e9f34a0f09
commit
42cc93dd0f
657 changed files with 3085 additions and 3085 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { Antenna } from '@/models/entities/antenna.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { AntennaNotes, Mutings, Notes } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { isMutedUserRelated } from '@/misc/is-muted-user-related.js';
|
||||
import { publishAntennaStream, publishMainStream } from '@/services/stream.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Antenna } from '@/models/entities/antenna';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { AntennaNotes, Mutings, Notes } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { isMutedUserRelated } from '@/misc/is-muted-user-related';
|
||||
import { publishAntennaStream, publishMainStream } from '@/services/stream';
|
||||
import { User } from '@/models/entities/user';
|
||||
|
||||
export async function addNoteToAntenna(antenna: Antenna, note: Note, noteUser: { id: User['id']; }) {
|
||||
// 通知しない設定になっているか、自分自身の投稿なら既読にする
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import { publishMainStream, publishUserEvent } from '@/services/stream.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import renderBlock from '@/remote/activitypub/renderer/block.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import renderReject from '@/remote/activitypub/renderer/reject.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Blockings, Users, FollowRequests, Followings, UserListJoinings, UserLists } from '@/models/index.js';
|
||||
import { perUserFollowingChart } from '@/services/chart/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { publishMainStream, publishUserEvent } from '@/services/stream';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import renderBlock from '@/remote/activitypub/renderer/block';
|
||||
import { deliver } from '@/queue/index';
|
||||
import renderReject from '@/remote/activitypub/renderer/reject';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Blockings, Users, FollowRequests, Followings, UserListJoinings, UserLists } from '@/models/index';
|
||||
import { perUserFollowingChart } from '@/services/chart/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
|
||||
export default async function(blocker: User, blockee: User) {
|
||||
await Promise.all([
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderBlock from '@/remote/activitypub/renderer/block.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import Logger from '../logger.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Blockings, Users } from '@/models/index.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderBlock from '@/remote/activitypub/renderer/block';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import { deliver } from '@/queue/index';
|
||||
import Logger from '../logger';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Blockings, Users } from '@/models/index';
|
||||
|
||||
const logger = new Logger('blocking/delete');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
import { name, schema } from '../schemas/active-users.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Users } from '@/models/index';
|
||||
import { name, schema } from '../schemas/active-users';
|
||||
|
||||
type ActiveUsersLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { DriveFiles } from '@/models/index.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { DriveFiles } from '@/models/index';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { name, schema } from '../schemas/drive.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { name, schema } from '../schemas/drive';
|
||||
|
||||
type DriveLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Instances } from '@/models/index.js';
|
||||
import { name, schema } from '../schemas/federation.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Instances } from '@/models/index';
|
||||
import { name, schema } from '../schemas/federation';
|
||||
|
||||
type FederationLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
import { name, schema } from '../schemas/hashtag.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Users } from '@/models/index';
|
||||
import { name, schema } from '../schemas/hashtag';
|
||||
|
||||
type HashtagLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { DriveFiles, Followings, Users, Notes } from '@/models/index.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { name, schema } from '../schemas/instance.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { toPuny } from '@/misc/convert-host.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { DriveFiles, Followings, Users, Notes } from '@/models/index';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { name, schema } from '../schemas/instance';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { toPuny } from '@/misc/convert-host';
|
||||
|
||||
type InstanceLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { name, schema } from '../schemas/network.js';
|
||||
import Chart, { DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { name, schema } from '../schemas/network';
|
||||
|
||||
type NetworkLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Notes } from '@/models/index.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Notes } from '@/models/index';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { name, schema } from '../schemas/notes.js';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { name, schema } from '../schemas/notes';
|
||||
|
||||
type NotesLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { DriveFiles } from '@/models/index.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { name, schema } from '../schemas/per-user-drive.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { DriveFiles } from '@/models/index';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { name, schema } from '../schemas/per-user-drive';
|
||||
|
||||
type PerUserDriveLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Followings, Users } from '@/models/index.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Followings, Users } from '@/models/index';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { name, schema } from '../schemas/per-user-following.js';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { name, schema } from '../schemas/per-user-following';
|
||||
|
||||
type PerUserFollowingLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Notes } from '@/models/index.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { name, schema } from '../schemas/per-user-notes.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Notes } from '@/models/index';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { name, schema } from '../schemas/per-user-notes';
|
||||
|
||||
type PerUserNotesLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { DeepPartial } from '../../core.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
import { name, schema } from '../schemas/per-user-reactions.js';
|
||||
import Chart, { DeepPartial } from '../../core';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Users } from '@/models/index';
|
||||
import { name, schema } from '../schemas/per-user-reactions';
|
||||
|
||||
type PerUserReactionsLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { name, schema } from '../schemas/test-grouped.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { name, schema } from '../schemas/test-grouped';
|
||||
|
||||
type TestGroupedLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { name, schema } from '../schemas/test-unique.js';
|
||||
import Chart, { DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { name, schema } from '../schemas/test-unique';
|
||||
|
||||
type TestUniqueLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { name, schema } from '../schemas/test.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { name, schema } from '../schemas/test';
|
||||
|
||||
type TestLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj, DeepPartial } from '../../core.js';
|
||||
import { SchemaType } from '@/misc/schema.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
import Chart, { Obj, DeepPartial } from '../../core';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Users } from '@/models/index';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { name, schema } from '../schemas/users.js';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { name, schema } from '../schemas/users';
|
||||
|
||||
type UsersLog = SchemaType<typeof schema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
import * as nestedProperty from 'nested-property';
|
||||
import autobind from 'autobind-decorator';
|
||||
import Logger from '../logger.js';
|
||||
import { Schema } from '@/misc/schema.js';
|
||||
import Logger from '../logger';
|
||||
import { Schema } from '@/misc/schema';
|
||||
import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm';
|
||||
import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time.js';
|
||||
import { getChartInsertLock } from '@/misc/app-lock.js';
|
||||
import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time';
|
||||
import { getChartInsertLock } from '@/misc/app-lock';
|
||||
|
||||
const logger = new Logger('chart', 'white', process.env.NODE_ENV !== 'test');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
import Chart from './core.js';
|
||||
import Chart from './core';
|
||||
|
||||
//const _filename = fileURLToPath(import.meta.url);
|
||||
const _filename = __filename;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import FederationChart from './charts/classes/federation.js';
|
||||
import NotesChart from './charts/classes/notes.js';
|
||||
import UsersChart from './charts/classes/users.js';
|
||||
import NetworkChart from './charts/classes/network.js';
|
||||
import ActiveUsersChart from './charts/classes/active-users.js';
|
||||
import InstanceChart from './charts/classes/instance.js';
|
||||
import PerUserNotesChart from './charts/classes/per-user-notes.js';
|
||||
import DriveChart from './charts/classes/drive.js';
|
||||
import PerUserReactionsChart from './charts/classes/per-user-reactions.js';
|
||||
import HashtagChart from './charts/classes/hashtag.js';
|
||||
import PerUserFollowingChart from './charts/classes/per-user-following.js';
|
||||
import PerUserDriveChart from './charts/classes/per-user-drive.js';
|
||||
import { beforeShutdown } from '@/misc/before-shutdown.js';
|
||||
import FederationChart from './charts/classes/federation';
|
||||
import NotesChart from './charts/classes/notes';
|
||||
import UsersChart from './charts/classes/users';
|
||||
import NetworkChart from './charts/classes/network';
|
||||
import ActiveUsersChart from './charts/classes/active-users';
|
||||
import InstanceChart from './charts/classes/instance';
|
||||
import PerUserNotesChart from './charts/classes/per-user-notes';
|
||||
import DriveChart from './charts/classes/drive';
|
||||
import PerUserReactionsChart from './charts/classes/per-user-reactions';
|
||||
import HashtagChart from './charts/classes/hashtag';
|
||||
import PerUserFollowingChart from './charts/classes/per-user-following';
|
||||
import PerUserDriveChart from './charts/classes/per-user-drive';
|
||||
import { beforeShutdown } from '@/misc/before-shutdown';
|
||||
|
||||
export const federationChart = new FederationChart();
|
||||
export const notesChart = new NotesChart();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { publishMainStream } from '@/services/stream.js';
|
||||
import pushSw from './push-notification.js';
|
||||
import { Notifications, Mutings, UserProfiles, Users } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Notification } from '@/models/entities/notification.js';
|
||||
import { sendEmailNotification } from './send-email-notification.js';
|
||||
import { publishMainStream } from '@/services/stream';
|
||||
import pushSw from './push-notification';
|
||||
import { Notifications, Mutings, UserProfiles, Users } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Notification } from '@/models/entities/notification';
|
||||
import { sendEmailNotification } from './send-email-notification';
|
||||
|
||||
export async function createNotification(
|
||||
notifieeId: User['id'],
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import * as bcrypt from 'bcryptjs';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import generateNativeUserToken from '../server/api/common/generate-native-user-token.js';
|
||||
import { genRsaKeyPair } from '@/misc/gen-key-pair.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { UserProfile } from '@/models/entities/user-profile.js';
|
||||
import generateNativeUserToken from '../server/api/common/generate-native-user-token';
|
||||
import { genRsaKeyPair } from '@/misc/gen-key-pair';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { UserProfile } from '@/models/entities/user-profile';
|
||||
import { getConnection } from 'typeorm';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { UserKeypair } from '@/models/entities/user-keypair.js';
|
||||
import { UsedUsername } from '@/models/entities/used-username.js';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { UserKeypair } from '@/models/entities/user-keypair';
|
||||
import { UsedUsername } from '@/models/entities/used-username';
|
||||
|
||||
export async function createSystemUser(username: string) {
|
||||
const password = uuid();
|
||||
|
|
|
|||
|
|
@ -2,23 +2,23 @@ import * as fs from 'fs';
|
|||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { publishMainStream, publishDriveStream } from '@/services/stream.js';
|
||||
import { deleteFile } from './delete-file.js';
|
||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||
import { GenerateVideoThumbnail } from './generate-video-thumbnail.js';
|
||||
import { driveLogger } from './logger.js';
|
||||
import { IImage, convertSharpToJpeg, convertSharpToWebp, convertSharpToPng, convertSharpToPngOrJpeg } from './image-processor.js';
|
||||
import { contentDisposition } from '@/misc/content-disposition.js';
|
||||
import { getFileInfo } from '@/misc/get-file-info.js';
|
||||
import { DriveFiles, DriveFolders, Users, Instances, UserProfiles } from '@/models/index.js';
|
||||
import { InternalStorage } from './internal-storage.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { IRemoteUser, User } from '@/models/entities/user.js';
|
||||
import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
|
||||
import { publishMainStream, publishDriveStream } from '@/services/stream';
|
||||
import { deleteFile } from './delete-file';
|
||||
import { fetchMeta } from '@/misc/fetch-meta';
|
||||
import { GenerateVideoThumbnail } from './generate-video-thumbnail';
|
||||
import { driveLogger } from './logger';
|
||||
import { IImage, convertSharpToJpeg, convertSharpToWebp, convertSharpToPng, convertSharpToPngOrJpeg } from './image-processor';
|
||||
import { contentDisposition } from '@/misc/content-disposition';
|
||||
import { getFileInfo } from '@/misc/get-file-info';
|
||||
import { DriveFiles, DriveFolders, Users, Instances, UserProfiles } from '@/models/index';
|
||||
import { InternalStorage } from './internal-storage';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { IRemoteUser, User } from '@/models/entities/user';
|
||||
import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
|
||||
import * as S3 from 'aws-sdk/clients/s3';
|
||||
import { getS3 } from './s3.js';
|
||||
import { getS3 } from './s3';
|
||||
import * as sharp from 'sharp';
|
||||
|
||||
const logger = driveLogger.createSubLogger('register', 'yellow');
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { InternalStorage } from './internal-storage.js';
|
||||
import { DriveFiles, Instances, Notes, Users } from '@/models/index.js';
|
||||
import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index.js';
|
||||
import { createDeleteObjectStorageFileJob } from '@/queue/index.js';
|
||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||
import { getS3 } from './s3.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { InternalStorage } from './internal-storage';
|
||||
import { DriveFiles, Instances, Notes, Users } from '@/models/index';
|
||||
import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index';
|
||||
import { createDeleteObjectStorageFileJob } from '@/queue/index';
|
||||
import { fetchMeta } from '@/misc/fetch-meta';
|
||||
import { getS3 } from './s3';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete.js';
|
||||
import renderTombstone from '@/remote/activitypub/renderer/tombstone.js';
|
||||
import config from '@/config/index.js';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete';
|
||||
import renderTombstone from '@/remote/activitypub/renderer/tombstone';
|
||||
import config from '@/config/index';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { deliverToRelays } from '../relay.js';
|
||||
import { deliverToRelays } from '../relay';
|
||||
|
||||
export async function deleteFile(file: DriveFile, isExpired = false) {
|
||||
if (file.storedInternal) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as fs from 'fs';
|
||||
import * as tmp from 'tmp';
|
||||
import { IImage, convertToJpeg } from './image-processor.js';
|
||||
import { IImage, convertToJpeg } from './image-processor';
|
||||
import * as FFmpeg from 'fluent-ffmpeg';
|
||||
|
||||
export async function GenerateVideoThumbnail(path: string): Promise<IImage> {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import * as fs from 'fs';
|
|||
import * as Path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
import config from '@/config/index.js';
|
||||
import config from '@/config/index';
|
||||
|
||||
//const _filename = fileURLToPath(import.meta.url);
|
||||
const _filename = __filename;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import Logger from '../logger.js';
|
||||
import Logger from '../logger';
|
||||
|
||||
export const driveLogger = new Logger('drive', 'blue');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { URL } from 'url';
|
||||
import * as S3 from 'aws-sdk/clients/s3';
|
||||
import { Meta } from '@/models/entities/meta.js';
|
||||
import { getAgentByUrl } from '@/misc/fetch.js';
|
||||
import { Meta } from '@/models/entities/meta';
|
||||
import { getAgentByUrl } from '@/misc/fetch';
|
||||
|
||||
export function getS3(meta: Meta) {
|
||||
const u = meta.objectStorageEndpoint != null
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { URL } from 'url';
|
||||
import create from './add-file.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { driveLogger } from './logger.js';
|
||||
import { createTemp } from '@/misc/create-temp.js';
|
||||
import { downloadUrl } from '@/misc/download-url.js';
|
||||
import { DriveFolder } from '@/models/entities/drive-folder.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { DriveFiles } from '@/models/index.js';
|
||||
import create from './add-file';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { driveLogger } from './logger';
|
||||
import { createTemp } from '@/misc/create-temp';
|
||||
import { downloadUrl } from '@/misc/download-url';
|
||||
import { DriveFolder } from '@/models/entities/drive-folder';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { DriveFiles } from '@/models/index';
|
||||
|
||||
const logger = driveLogger.createSubLogger('downloader');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { DOMWindow, JSDOM } from 'jsdom';
|
||||
import fetch from 'node-fetch';
|
||||
import { getJson, getHtml, getAgentByUrl } from '@/misc/fetch.js';
|
||||
import { Instance } from '@/models/entities/instance.js';
|
||||
import { Instances } from '@/models/index.js';
|
||||
import { getFetchInstanceMetadataLock } from '@/misc/app-lock.js';
|
||||
import Logger from './logger.js';
|
||||
import { getJson, getHtml, getAgentByUrl } from '@/misc/fetch';
|
||||
import { Instance } from '@/models/entities/instance';
|
||||
import { Instances } from '@/models/index';
|
||||
import { getFetchInstanceMetadataLock } from '@/misc/app-lock';
|
||||
import Logger from './logger';
|
||||
import { URL } from 'url';
|
||||
|
||||
const logger = new Logger('metadata', 'cyan');
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { publishMainStream, publishUserEvent } from '@/services/stream.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
import renderAccept from '@/remote/activitypub/renderer/accept.js';
|
||||
import renderReject from '@/remote/activitypub/renderer/reject.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import createFollowRequest from './requests/create.js';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js';
|
||||
import Logger from '../logger.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Followings, Users, FollowRequests, Blockings, Instances, UserProfiles } from '@/models/index.js';
|
||||
import { instanceChart, perUserFollowingChart } from '@/services/chart/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { createNotification } from '../create-notification.js';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
|
||||
import { publishMainStream, publishUserEvent } from '@/services/stream';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow';
|
||||
import renderAccept from '@/remote/activitypub/renderer/accept';
|
||||
import renderReject from '@/remote/activitypub/renderer/reject';
|
||||
import { deliver } from '@/queue/index';
|
||||
import createFollowRequest from './requests/create';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc';
|
||||
import Logger from '../logger';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Followings, Users, FollowRequests, Blockings, Instances, UserProfiles } from '@/models/index';
|
||||
import { instanceChart, perUserFollowingChart } from '@/services/chart/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { createNotification } from '../create-notification';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
|
||||
|
||||
const logger = new Logger('following/create');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { publishMainStream, publishUserEvent } from '@/services/stream.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import Logger from '../logger.js';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Followings, Users, Instances } from '@/models/index.js';
|
||||
import { instanceChart, perUserFollowingChart } from '@/services/chart/index.js';
|
||||
import { publishMainStream, publishUserEvent } from '@/services/stream';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import { deliver } from '@/queue/index';
|
||||
import Logger from '../logger';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Followings, Users, Instances } from '@/models/index';
|
||||
import { instanceChart, perUserFollowingChart } from '@/services/chart/index';
|
||||
|
||||
const logger = new Logger('following/delete');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import accept from './accept.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { FollowRequests, Users } from '@/models/index.js';
|
||||
import accept from './accept';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { FollowRequests, Users } from '@/models/index';
|
||||
|
||||
/**
|
||||
* 指定したユーザー宛てのフォローリクエストをすべて承認
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
import renderAccept from '@/remote/activitypub/renderer/accept.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import { publishMainStream } from '@/services/stream.js';
|
||||
import { insertFollowingDoc } from '../create.js';
|
||||
import { User, ILocalUser } from '@/models/entities/user.js';
|
||||
import { FollowRequests, Users } from '@/models/index.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow';
|
||||
import renderAccept from '@/remote/activitypub/renderer/accept';
|
||||
import { deliver } from '@/queue/index';
|
||||
import { publishMainStream } from '@/services/stream';
|
||||
import { insertFollowingDoc } from '../create';
|
||||
import { User, ILocalUser } from '@/models/entities/user';
|
||||
import { FollowRequests, Users } from '@/models/index';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error';
|
||||
|
||||
export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, follower: User) {
|
||||
const request = await FollowRequests.findOne({
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import { publishMainStream } from '@/services/stream.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { User, ILocalUser } from '@/models/entities/user.js';
|
||||
import { Users, FollowRequests } from '@/models/index.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import { deliver } from '@/queue/index';
|
||||
import { publishMainStream } from '@/services/stream';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error';
|
||||
import { User, ILocalUser } from '@/models/entities/user';
|
||||
import { Users, FollowRequests } from '@/models/index';
|
||||
|
||||
export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox'] }, follower: { id: User['id']; host: User['host']; uri: User['host'] }) {
|
||||
if (Users.isRemoteUser(followee)) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { publishMainStream } from '@/services/stream.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Blockings, FollowRequests, Users } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { createNotification } from '../../create-notification.js';
|
||||
import { publishMainStream } from '@/services/stream';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow';
|
||||
import { deliver } from '@/queue/index';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Blockings, FollowRequests, Users } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { createNotification } from '../../create-notification';
|
||||
|
||||
export default async function(follower: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, requestId?: string) {
|
||||
if (follower.id === followee.id) return;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
import renderReject from '@/remote/activitypub/renderer/reject.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import { publishMainStream, publishUserEvent } from '@/services/stream.js';
|
||||
import { User, ILocalUser } from '@/models/entities/user.js';
|
||||
import { Users, FollowRequests, Followings } from '@/models/index.js';
|
||||
import { decrementFollowing } from '../delete.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow';
|
||||
import renderReject from '@/remote/activitypub/renderer/reject';
|
||||
import { deliver } from '@/queue/index';
|
||||
import { publishMainStream, publishUserEvent } from '@/services/stream';
|
||||
import { User, ILocalUser } from '@/models/entities/user';
|
||||
import { Users, FollowRequests, Followings } from '@/models/index';
|
||||
import { decrementFollowing } from '../delete';
|
||||
|
||||
export default async function(followee: { id: User['id']; host: User['host']; uri: User['host'] }, follower: User) {
|
||||
if (Users.isRemoteUser(follower) && Users.isLocalUser(followee)) {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import config from '@/config/index.js';
|
||||
import renderAdd from '@/remote/activitypub/renderer/add.js';
|
||||
import renderRemove from '@/remote/activitypub/renderer/remove.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { Notes, UserNotePinings, Users } from '@/models/index.js';
|
||||
import { UserNotePining } from '@/models/entities/user-note-pining.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js';
|
||||
import { deliverToRelays } from '../relay.js';
|
||||
import config from '@/config/index';
|
||||
import renderAdd from '@/remote/activitypub/renderer/add';
|
||||
import renderRemove from '@/remote/activitypub/renderer/remove';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { Notes, UserNotePinings, Users } from '@/models/index';
|
||||
import { UserNotePining } from '@/models/entities/user-note-pining';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager';
|
||||
import { deliverToRelays } from '../relay';
|
||||
|
||||
/**
|
||||
* 指定した投稿をピン留めします
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import renderUpdate from '@/remote/activitypub/renderer/update.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { renderPerson } from '@/remote/activitypub/renderer/person.js';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js';
|
||||
import { deliverToRelays } from '../relay.js';
|
||||
import renderUpdate from '@/remote/activitypub/renderer/update';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import { Users } from '@/models/index';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { renderPerson } from '@/remote/activitypub/renderer/person';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager';
|
||||
import { deliverToRelays } from '../relay';
|
||||
|
||||
export async function publishToFollowers(userId: User['id']) {
|
||||
const user = await Users.findOne(userId);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ModerationLogs } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { ModerationLogs } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { User } from '@/models/entities/user';
|
||||
|
||||
export async function insertModerationLog(moderator: { id: User['id'] }, type: string, info?: Record<string, any>) {
|
||||
await ModerationLogs.insert({
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { createSystemUser } from './create-system-user.js';
|
||||
import { ILocalUser } from '@/models/entities/user.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
import { Cache } from '@/misc/cache.js';
|
||||
import { createSystemUser } from './create-system-user';
|
||||
import { ILocalUser } from '@/models/entities/user';
|
||||
import { Users } from '@/models/index';
|
||||
import { Cache } from '@/misc/cache';
|
||||
|
||||
const ACTOR_USERNAME = 'instance.actor' as const;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ import * as cluster from 'cluster';
|
|||
import * as os from 'os';
|
||||
import * as chalk from 'chalk';
|
||||
import * as dateformat from 'dateformat';
|
||||
import { program } from '../argv.js';
|
||||
import { program } from '../argv';
|
||||
import { getRepository } from 'typeorm';
|
||||
import { Log } from '@/models/entities/log.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import config from '@/config/index.js';
|
||||
import { Log } from '@/models/entities/log';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import config from '@/config/index';
|
||||
|
||||
import SyslogPro from 'syslog-pro';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
import { User } from '@/models/entities/user.js';
|
||||
import { UserGroup } from '@/models/entities/user-group.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { MessagingMessages, UserGroupJoinings, Mutings, Users } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { MessagingMessage } from '@/models/entities/messaging-message.js';
|
||||
import { publishMessagingStream, publishMessagingIndexStream, publishMainStream, publishGroupMessagingStream } from '@/services/stream.js';
|
||||
import pushNotification from '../push-notification.js';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { UserGroup } from '@/models/entities/user-group';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { MessagingMessages, UserGroupJoinings, Mutings, Users } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { MessagingMessage } from '@/models/entities/messaging-message';
|
||||
import { publishMessagingStream, publishMessagingIndexStream, publishMainStream, publishGroupMessagingStream } from '@/services/stream';
|
||||
import pushNotification from '../push-notification';
|
||||
import { Not } from 'typeorm';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import renderNote from '@/remote/activitypub/renderer/note.js';
|
||||
import renderCreate from '@/remote/activitypub/renderer/create.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import renderNote from '@/remote/activitypub/renderer/note';
|
||||
import renderCreate from '@/remote/activitypub/renderer/create';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import { deliver } from '@/queue/index';
|
||||
|
||||
export async function createMessage(user: { id: User['id']; host: User['host']; }, recipientUser: User | undefined, recipientGroup: UserGroup | undefined, text: string | undefined, file: DriveFile | null, uri?: string) {
|
||||
const message = {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import config from '@/config/index.js';
|
||||
import { MessagingMessages, Users } from '@/models/index.js';
|
||||
import { MessagingMessage } from '@/models/entities/messaging-message.js';
|
||||
import { publishGroupMessagingStream, publishMessagingStream } from '@/services/stream.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete.js';
|
||||
import renderTombstone from '@/remote/activitypub/renderer/tombstone.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import config from '@/config/index';
|
||||
import { MessagingMessages, Users } from '@/models/index';
|
||||
import { MessagingMessage } from '@/models/entities/messaging-message';
|
||||
import { publishGroupMessagingStream, publishMessagingStream } from '@/services/stream';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete';
|
||||
import renderTombstone from '@/remote/activitypub/renderer/tombstone';
|
||||
import { deliver } from '@/queue/index';
|
||||
|
||||
export async function deleteMessage(message: MessagingMessage) {
|
||||
await MessagingMessages.delete(message.id);
|
||||
|
|
|
|||
|
|
@ -1,39 +1,39 @@
|
|||
import * as mfm from 'mfm-js';
|
||||
import es from '../../db/elasticsearch.js';
|
||||
import { publishMainStream, publishNotesStream } from '@/services/stream.js';
|
||||
import DeliverManager from '@/remote/activitypub/deliver-manager.js';
|
||||
import renderNote from '@/remote/activitypub/renderer/note.js';
|
||||
import renderCreate from '@/remote/activitypub/renderer/create.js';
|
||||
import renderAnnounce from '@/remote/activitypub/renderer/announce.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import { resolveUser } from '@/remote/resolve-user.js';
|
||||
import config from '@/config/index.js';
|
||||
import { updateHashtags } from '../update-hashtag.js';
|
||||
import { concat } from '../../prelude/array.js';
|
||||
import insertNoteUnread from './unread.js';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js';
|
||||
import { extractMentions } from '@/misc/extract-mentions.js';
|
||||
import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js';
|
||||
import { extractHashtags } from '@/misc/extract-hashtags.js';
|
||||
import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js';
|
||||
import { Mutings, Users, NoteWatchings, Notes, Instances, UserProfiles, Antennas, Followings, MutedNotes, Channels, ChannelFollowings, Blockings } from '@/models/index.js';
|
||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { App } from '@/models/entities/app.js';
|
||||
import es from '../../db/elasticsearch';
|
||||
import { publishMainStream, publishNotesStream } from '@/services/stream';
|
||||
import DeliverManager from '@/remote/activitypub/deliver-manager';
|
||||
import renderNote from '@/remote/activitypub/renderer/note';
|
||||
import renderCreate from '@/remote/activitypub/renderer/create';
|
||||
import renderAnnounce from '@/remote/activitypub/renderer/announce';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import { resolveUser } from '@/remote/resolve-user';
|
||||
import config from '@/config/index';
|
||||
import { updateHashtags } from '../update-hashtag';
|
||||
import { concat } from '../../prelude/array';
|
||||
import insertNoteUnread from './unread';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc';
|
||||
import { extractMentions } from '@/misc/extract-mentions';
|
||||
import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm';
|
||||
import { extractHashtags } from '@/misc/extract-hashtags';
|
||||
import { Note, IMentionedRemoteUsers } from '@/models/entities/note';
|
||||
import { Mutings, Users, NoteWatchings, Notes, Instances, UserProfiles, Antennas, Followings, MutedNotes, Channels, ChannelFollowings, Blockings } from '@/models/index';
|
||||
import { DriveFile } from '@/models/entities/drive-file';
|
||||
import { App } from '@/models/entities/app';
|
||||
import { Not, getConnection, In } from 'typeorm';
|
||||
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { notesChart, perUserNotesChart, activeUsersChart, instanceChart } from '@/services/chart/index.js';
|
||||
import { Poll, IPoll } from '@/models/entities/poll.js';
|
||||
import { createNotification } from '../create-notification.js';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
|
||||
import { checkHitAntenna } from '@/misc/check-hit-antenna.js';
|
||||
import { checkWordMute } from '@/misc/check-word-mute.js';
|
||||
import { addNoteToAntenna } from '../add-note-to-antenna.js';
|
||||
import { countSameRenotes } from '@/misc/count-same-renotes.js';
|
||||
import { deliverToRelays } from '../relay.js';
|
||||
import { Channel } from '@/models/entities/channel.js';
|
||||
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
|
||||
import { getAntennas } from '@/misc/antenna-cache.js';
|
||||
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { notesChart, perUserNotesChart, activeUsersChart, instanceChart } from '@/services/chart/index';
|
||||
import { Poll, IPoll } from '@/models/entities/poll';
|
||||
import { createNotification } from '../create-notification';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
|
||||
import { checkHitAntenna } from '@/misc/check-hit-antenna';
|
||||
import { checkWordMute } from '@/misc/check-word-mute';
|
||||
import { addNoteToAntenna } from '../add-note-to-antenna';
|
||||
import { countSameRenotes } from '@/misc/count-same-renotes';
|
||||
import { deliverToRelays } from '../relay';
|
||||
import { Channel } from '@/models/entities/channel';
|
||||
import { normalizeForSearch } from '@/misc/normalize-for-search';
|
||||
import { getAntennas } from '@/misc/antenna-cache';
|
||||
|
||||
type NotificationType = 'reply' | 'renote' | 'quote' | 'mention';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
import { publishNoteStream } from '@/services/stream.js';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete.js';
|
||||
import renderAnnounce from '@/remote/activitypub/renderer/announce.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderTombstone from '@/remote/activitypub/renderer/tombstone.js';
|
||||
import config from '@/config/index.js';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js';
|
||||
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js';
|
||||
import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js';
|
||||
import { Notes, Users, Instances } from '@/models/index.js';
|
||||
import { notesChart, perUserNotesChart, instanceChart } from '@/services/chart/index.js';
|
||||
import { deliverToFollowers, deliverToUser } from '@/remote/activitypub/deliver-manager.js';
|
||||
import { countSameRenotes } from '@/misc/count-same-renotes.js';
|
||||
import { deliverToRelays } from '../relay.js';
|
||||
import { publishNoteStream } from '@/services/stream';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete';
|
||||
import renderAnnounce from '@/remote/activitypub/renderer/announce';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderTombstone from '@/remote/activitypub/renderer/tombstone';
|
||||
import config from '@/config/index';
|
||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc';
|
||||
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user';
|
||||
import { Note, IMentionedRemoteUsers } from '@/models/entities/note';
|
||||
import { Notes, Users, Instances } from '@/models/index';
|
||||
import { notesChart, perUserNotesChart, instanceChart } from '@/services/chart/index';
|
||||
import { deliverToFollowers, deliverToUser } from '@/remote/activitypub/deliver-manager';
|
||||
import { countSameRenotes } from '@/misc/count-same-renotes';
|
||||
import { deliverToRelays } from '../relay';
|
||||
import { Brackets, In } from 'typeorm';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import renderUpdate from '@/remote/activitypub/renderer/update.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderNote from '@/remote/activitypub/renderer/note.js';
|
||||
import { Users, Notes } from '@/models/index.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js';
|
||||
import { deliverToRelays } from '../../relay.js';
|
||||
import renderUpdate from '@/remote/activitypub/renderer/update';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import renderNote from '@/remote/activitypub/renderer/note';
|
||||
import { Users, Notes } from '@/models/index';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { deliverToFollowers } from '@/remote/activitypub/deliver-manager';
|
||||
import { deliverToRelays } from '../../relay';
|
||||
|
||||
export async function deliverQuestionUpdate(noteId: Note['id']) {
|
||||
const note = await Notes.findOne(noteId);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { publishNoteStream } from '@/services/stream.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { PollVotes, NoteWatchings, Polls, Blockings } from '@/models/index.js';
|
||||
import { publishNoteStream } from '@/services/stream';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { PollVotes, NoteWatchings, Polls, Blockings } from '@/models/index';
|
||||
import { Not } from 'typeorm';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { createNotification } from '../../create-notification.js';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { createNotification } from '../../create-notification';
|
||||
|
||||
export default async function(user: User, note: Note, choice: number) {
|
||||
const poll = await Polls.findOne(note.id);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { publishNoteStream } from '@/services/stream.js';
|
||||
import { renderLike } from '@/remote/activitypub/renderer/like.js';
|
||||
import DeliverManager from '@/remote/activitypub/deliver-manager.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import { toDbReaction, decodeReaction } from '@/misc/reaction-lib.js';
|
||||
import { User, IRemoteUser } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { NoteReactions, Users, NoteWatchings, Notes, Emojis, Blockings } from '@/models/index.js';
|
||||
import { publishNoteStream } from '@/services/stream';
|
||||
import { renderLike } from '@/remote/activitypub/renderer/like';
|
||||
import DeliverManager from '@/remote/activitypub/deliver-manager';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import { toDbReaction, decodeReaction } from '@/misc/reaction-lib';
|
||||
import { User, IRemoteUser } from '@/models/entities/user';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { NoteReactions, Users, NoteWatchings, Notes, Emojis, Blockings } from '@/models/index';
|
||||
import { Not } from 'typeorm';
|
||||
import { perUserReactionsChart } from '@/services/chart/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { createNotification } from '../../create-notification.js';
|
||||
import deleteReaction from './delete.js';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
|
||||
import { NoteReaction } from '@/models/entities/note-reaction.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { perUserReactionsChart } from '@/services/chart/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { createNotification } from '../../create-notification';
|
||||
import deleteReaction from './delete';
|
||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
|
||||
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error';
|
||||
|
||||
export default async (user: { id: User['id']; host: User['host']; }, note: Note, reaction?: string) => {
|
||||
// Check blocking
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { publishNoteStream } from '@/services/stream.js';
|
||||
import { renderLike } from '@/remote/activitypub/renderer/like.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import DeliverManager from '@/remote/activitypub/deliver-manager.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { User, IRemoteUser } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { NoteReactions, Users, Notes } from '@/models/index.js';
|
||||
import { decodeReaction } from '@/misc/reaction-lib.js';
|
||||
import { publishNoteStream } from '@/services/stream';
|
||||
import { renderLike } from '@/remote/activitypub/renderer/like';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import DeliverManager from '@/remote/activitypub/deliver-manager';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error';
|
||||
import { User, IRemoteUser } from '@/models/entities/user';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { NoteReactions, Users, Notes } from '@/models/index';
|
||||
import { decodeReaction } from '@/misc/reaction-lib';
|
||||
|
||||
export default async (user: { id: User['id']; host: User['host']; }, note: Note) => {
|
||||
// if already unreacted
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { publishMainStream } from '@/services/stream.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { NoteUnreads, AntennaNotes, Users, Followings, ChannelFollowings } from '@/models/index.js';
|
||||
import { publishMainStream } from '@/services/stream';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { NoteUnreads, AntennaNotes, Users, Followings, ChannelFollowings } from '@/models/index';
|
||||
import { Not, IsNull, In } from 'typeorm';
|
||||
import { Channel } from '@/models/entities/channel.js';
|
||||
import { checkHitAntenna } from '@/misc/check-hit-antenna.js';
|
||||
import { getAntennas } from '@/misc/antenna-cache.js';
|
||||
import { PackedNote } from '@/models/repositories/note.js';
|
||||
import { readNotificationByQuery } from '@/server/api/common/read-notification.js';
|
||||
import { Channel } from '@/models/entities/channel';
|
||||
import { checkHitAntenna } from '@/misc/check-hit-antenna';
|
||||
import { getAntennas } from '@/misc/antenna-cache';
|
||||
import { PackedNote } from '@/models/repositories/note';
|
||||
import { readNotificationByQuery } from '@/server/api/common/read-notification';
|
||||
|
||||
/**
|
||||
* Mark notes as read
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Note } from '@/models/entities/note.js';
|
||||
import { publishMainStream } from '@/services/stream.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Mutings, NoteUnreads } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { publishMainStream } from '@/services/stream';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Mutings, NoteUnreads } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
|
||||
export default async function(userId: User['id'], note: Note, params: {
|
||||
// NOTE: isSpecifiedがtrueならisMentionedは必ずfalse
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { User } from '@/models/entities/user.js';
|
||||
import { NoteWatchings } from '@/models/index.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { NoteWatchings } from '@/models/index';
|
||||
import { Note } from '@/models/entities/note';
|
||||
|
||||
export default async (me: User['id'], note: Note) => {
|
||||
await NoteWatchings.delete({
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { User } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { NoteWatchings } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { NoteWatching } from '@/models/entities/note-watching.js';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { NoteWatchings } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { NoteWatching } from '@/models/entities/note-watching';
|
||||
|
||||
export default async (me: User['id'], note: Note) => {
|
||||
// 自分の投稿はwatchできない
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import * as push from 'web-push';
|
||||
import config from '@/config/index.js';
|
||||
import { SwSubscriptions } from '@/models/index.js';
|
||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||
import { PackedNotification } from '../models/repositories/notification.js';
|
||||
import { PackedMessagingMessage } from '../models/repositories/messaging-message.js';
|
||||
import config from '@/config/index';
|
||||
import { SwSubscriptions } from '@/models/index';
|
||||
import { fetchMeta } from '@/misc/fetch-meta';
|
||||
import { PackedNotification } from '../models/repositories/notification';
|
||||
import { PackedMessagingMessage } from '../models/repositories/messaging-message';
|
||||
|
||||
type notificationType = 'notification' | 'unreadMessagingMessage';
|
||||
type notificationBody = PackedNotification | PackedMessagingMessage;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Instance } from '@/models/entities/instance.js';
|
||||
import { Instances } from '@/models/index.js';
|
||||
import { federationChart } from '@/services/chart/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { toPuny } from '@/misc/convert-host.js';
|
||||
import { Cache } from '@/misc/cache.js';
|
||||
import { Instance } from '@/models/entities/instance';
|
||||
import { Instances } from '@/models/index';
|
||||
import { federationChart } from '@/services/chart/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { toPuny } from '@/misc/convert-host';
|
||||
import { Cache } from '@/misc/cache';
|
||||
|
||||
const cache = new Cache<Instance>(1000 * 60 * 60);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { createSystemUser } from './create-system-user.js';
|
||||
import { renderFollowRelay } from '@/remote/activitypub/renderer/follow-relay.js';
|
||||
import { renderActivity, attachLdSignature } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import { ILocalUser, User } from '@/models/entities/user.js';
|
||||
import { Users, Relays } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { createSystemUser } from './create-system-user';
|
||||
import { renderFollowRelay } from '@/remote/activitypub/renderer/follow-relay';
|
||||
import { renderActivity, attachLdSignature } from '@/remote/activitypub/renderer/index';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import { deliver } from '@/queue/index';
|
||||
import { ILocalUser, User } from '@/models/entities/user';
|
||||
import { Users, Relays } from '@/models/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
|
||||
const ACTOR_USERNAME = 'relay.actor' as const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { UserProfiles } from '@/models/index.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { sendEmail } from './send-email.js';
|
||||
import * as locales from '../../locales/index.js';
|
||||
import { I18n } from '@/misc/i18n.js';
|
||||
import { getAcct } from '@/misc/acct.js';
|
||||
import { UserProfiles } from '@/models/index';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { sendEmail } from './send-email';
|
||||
import * as locales from '../../locales/index';
|
||||
import { I18n } from '@/misc/i18n';
|
||||
import { getAcct } from '@/misc/acct';
|
||||
|
||||
// TODO: locale ファイルをクライアント用とサーバー用で分けたい
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as nodemailer from 'nodemailer';
|
||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||
import Logger from './logger.js';
|
||||
import config from '@/config/index.js';
|
||||
import { fetchMeta } from '@/misc/fetch-meta';
|
||||
import Logger from './logger';
|
||||
import config from '@/config/index';
|
||||
|
||||
export const logger = new Logger('email');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { redisClient } from '../db/redis.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { UserList } from '@/models/entities/user-list.js';
|
||||
import { ReversiGame } from '@/models/entities/games/reversi/game.js';
|
||||
import { UserGroup } from '@/models/entities/user-group.js';
|
||||
import config from '@/config/index.js';
|
||||
import { Antenna } from '@/models/entities/antenna.js';
|
||||
import { Channel } from '@/models/entities/channel.js';
|
||||
import { redisClient } from '../db/redis';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Note } from '@/models/entities/note';
|
||||
import { UserList } from '@/models/entities/user-list';
|
||||
import { ReversiGame } from '@/models/entities/games/reversi/game';
|
||||
import { UserGroup } from '@/models/entities/user-group';
|
||||
import config from '@/config/index';
|
||||
import { Antenna } from '@/models/entities/antenna';
|
||||
import { Channel } from '@/models/entities/channel';
|
||||
|
||||
class Publisher {
|
||||
private publish = (channel: string, type: string | null, value?: any): void => {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import renderDelete from '@/remote/activitypub/renderer/delete.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import config from '@/config/index.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Users, Followings } from '@/models/index.js';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import { deliver } from '@/queue/index';
|
||||
import config from '@/config/index';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Users, Followings } from '@/models/index';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
|
||||
export async function doPostSuspend(user: { id: User['id']; host: User['host'] }) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import renderDelete from '@/remote/activitypub/renderer/delete.js';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import { deliver } from '@/queue/index.js';
|
||||
import config from '@/config/index.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { Users, Followings } from '@/models/index.js';
|
||||
import renderDelete from '@/remote/activitypub/renderer/delete';
|
||||
import renderUndo from '@/remote/activitypub/renderer/undo';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||
import { deliver } from '@/queue/index';
|
||||
import config from '@/config/index';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Users, Followings } from '@/models/index';
|
||||
import { Not, IsNull } from 'typeorm';
|
||||
|
||||
export async function doPostUnsuspend(user: User) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { User } from '@/models/entities/user.js';
|
||||
import { Hashtags, Users } from '@/models/index.js';
|
||||
import { hashtagChart } from '@/services/chart/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { Hashtag } from '@/models/entities/hashtag.js';
|
||||
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { Hashtags, Users } from '@/models/index';
|
||||
import { hashtagChart } from '@/services/chart/index';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { Hashtag } from '@/models/entities/hashtag';
|
||||
import { normalizeForSearch } from '@/misc/normalize-for-search';
|
||||
|
||||
export async function updateHashtags(user: { id: User['id']; host: User['host']; }, tags: string[]) {
|
||||
for (const tag of tags) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { publishUserListStream } from '@/services/stream.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { UserList } from '@/models/entities/user-list.js';
|
||||
import { UserListJoinings, Users } from '@/models/index.js';
|
||||
import { UserListJoining } from '@/models/entities/user-list-joining.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { fetchProxyAccount } from '@/misc/fetch-proxy-account.js';
|
||||
import createFollowing from '../following/create.js';
|
||||
import { publishUserListStream } from '@/services/stream';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { UserList } from '@/models/entities/user-list';
|
||||
import { UserListJoinings, Users } from '@/models/index';
|
||||
import { UserListJoining } from '@/models/entities/user-list-joining';
|
||||
import { genId } from '@/misc/gen-id';
|
||||
import { fetchProxyAccount } from '@/misc/fetch-proxy-account';
|
||||
import createFollowing from '../following/create';
|
||||
|
||||
export async function pushUserToUserList(target: User, list: UserList) {
|
||||
await UserListJoinings.insert({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue