mirror of
https://github.com/misskey-dev/misskey
synced 2024-12-01 08:18:51 +09:00
Refactor
This commit is contained in:
parent
e8bde94e5b
commit
cd2542e0fd
@ -229,7 +229,7 @@
|
||||
|
||||
</style>
|
||||
<script lang="typescript">
|
||||
import getAcct from '../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../misc/user/get-acct';
|
||||
|
||||
this.post = this.opts.post;
|
||||
this.form = this.opts.form;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import getPostSummary from '../../../../common/get-post-summary';
|
||||
import getReactionEmoji from '../../../../common/get-reaction-emoji';
|
||||
import getPostSummary from '../../../../misc/get-post-summary';
|
||||
import getReactionEmoji from '../../../../misc/get-reaction-emoji';
|
||||
|
||||
type Notification = {
|
||||
title: string;
|
||||
|
@ -21,7 +21,7 @@
|
||||
import Vue from 'vue';
|
||||
import * as emojilib from 'emojilib';
|
||||
import contains from '../../../common/scripts/contains';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
const lib = Object.entries(emojilib.lib).filter((x: any) => {
|
||||
return x[1].category != 'flags';
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import parse from '../../../../../common/text/parse';
|
||||
|
||||
export default Vue.extend({
|
||||
|
@ -51,7 +51,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
|
@ -43,7 +43,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as CRC32 from 'crc-32';
|
||||
import Othello, { Color } from '../../../../../common/othello/core';
|
||||
import Othello, { Color } from '../../../../../misc/othello/core';
|
||||
import { url } from '../../../config';
|
||||
|
||||
export default Vue.extend({
|
||||
|
@ -94,7 +94,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as maps from '../../../../../common/othello/maps';
|
||||
import * as maps from '../../../../../misc/othello/maps';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['game', 'connection'],
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import * as emojilib from 'emojilib';
|
||||
import parse from '../../../../../common/text/parse';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import { url } from '../../../config';
|
||||
import MkUrl from './url.vue';
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -8,7 +8,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { url } from '../../../config';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -102,8 +102,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getPostSummary from '../../../../../common/get-post-summary';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import getPostSummary from '../../../../../misc/get-post-summary';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -28,7 +28,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import dateStringify from '../../../common/scripts/date-stringify';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -78,7 +78,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import dateStringify from '../../../common/scripts/date-stringify';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import parse from '../../../../../common/text/parse';
|
||||
|
||||
import MkPostFormWindow from './post-form-window.vue';
|
||||
|
@ -21,7 +21,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import dateStringify from '../../../common/scripts/date-stringify';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -21,7 +21,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import dateStringify from '../../../common/scripts/date-stringify';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -85,7 +85,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import dateStringify from '../../../common/scripts/date-stringify';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import parse from '../../../../../common/text/parse';
|
||||
|
||||
import MkPostFormWindow from './post-form-window.vue';
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -29,8 +29,8 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as anime from 'animejs';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import parseAcct from '../../../../../common/user/parse-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import parseAcct from '../../../../../misc/user/parse-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -7,7 +7,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import getPostSummary from '../../../../../common/get-post-summary';
|
||||
import getPostSummary from '../../../../../misc/get-post-summary';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import parseAcct from '../../../../../common/user/parse-acct';
|
||||
import parseAcct from '../../../../../misc/user/parse-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import parseAcct from '../../../../../../common/user/parse-acct';
|
||||
import parseAcct from '../../../../../../misc/user/parse-acct';
|
||||
import Progress from '../../../../common/scripts/loading';
|
||||
import XHeader from './user.header.vue';
|
||||
import XHome from './user.home.vue';
|
||||
|
@ -43,7 +43,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { docsUrl, copyright, lang } from '../../../config';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
const shares = [
|
||||
'Everything!',
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../common/define-widget';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default define({
|
||||
name: 'polls',
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../common/define-widget';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default define({
|
||||
name: 'trends',
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../common/define-widget';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
const limit = 3;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import PostForm from '../views/components/post-form.vue';
|
||||
//import RepostForm from '../views/components/repost-form.vue';
|
||||
import getPostSummary from '../../../../common/get-post-summary';
|
||||
import getPostSummary from '../../../../misc/get-post-summary';
|
||||
|
||||
export default (os) => (opts) => {
|
||||
const o = opts || {};
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getPostSummary from '../../../../../common/get-post-summary';
|
||||
import getPostSummary from '../../../../../misc/get-post-summary';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['notification'],
|
||||
|
@ -78,8 +78,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getPostSummary from '../../../../../common/get-post-summary';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getPostSummary from '../../../../../misc/get-post-summary';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['notification'],
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import summary from '../../../../../common/get-post-summary';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import summary from '../../../../../misc/get-post-summary';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -80,7 +80,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import parse from '../../../../../common/text/parse';
|
||||
|
||||
import MkPostMenu from '../../../common/views/components/post-menu.vue';
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['post'],
|
||||
|
@ -77,7 +77,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import parse from '../../../../../common/text/parse';
|
||||
|
||||
import MkPostMenu from '../../../common/views/components/post-menu.vue';
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -19,7 +19,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import parseAcct from '../../../../../common/user/parse-acct';
|
||||
import parseAcct from '../../../../../misc/user/parse-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -19,7 +19,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import parseAcct from '../../../../../common/user/parse-acct';
|
||||
import parseAcct from '../../../../../misc/user/parse-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -64,7 +64,7 @@ import Vue from 'vue';
|
||||
import * as XDraggable from 'vuedraggable';
|
||||
import * as uuid from 'uuid';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import getPostSummary from '../../../../../common/get-post-summary';
|
||||
import getPostSummary from '../../../../../misc/get-post-summary';
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import parseAcct from '../../../../../common/user/parse-acct';
|
||||
import parseAcct from '../../../../../misc/user/parse-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
mounted() {
|
||||
|
@ -60,8 +60,8 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as age from 's-age';
|
||||
import getAcct from '../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../common/user/parse-acct';
|
||||
import getAcct from '../../../../../misc/user/get-acct';
|
||||
import getAcct from '../../../../../misc/user/parse-acct';
|
||||
import Progress from '../../../common/scripts/loading';
|
||||
import XHome from './user/home.vue';
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import getAcct from '../../../../../../common/user/get-acct';
|
||||
import getAcct from '../../../../../../misc/user/get-acct';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['user'],
|
||||
|
@ -14,7 +14,7 @@ import DriveFile, { getGridFSBucket } from '../../models/drive-file';
|
||||
import DriveFolder from '../../models/drive-folder';
|
||||
import { pack } from '../../models/drive-file';
|
||||
import event, { publishDriveStream } from '../event';
|
||||
import getAcct from '../user/get-acct';
|
||||
import getAcct from '../../misc/user/get-acct';
|
||||
import config from '../../conf';
|
||||
|
||||
const gm = _gm.subClass({
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Mention
|
||||
*/
|
||||
import parseAcct from '../../../../common/user/parse-acct';
|
||||
import parseAcct from '../../../../misc/user/parse-acct';
|
||||
|
||||
module.exports = text => {
|
||||
const match = text.match(/^(?:@[a-zA-Z0-9\-]+){1,2}/);
|
||||
|
@ -5,8 +5,8 @@ import User, { isLocalUser, pack as packUser, ILocalUser } from '../../models/us
|
||||
import Following from '../../models/following';
|
||||
import event from '../../common/event';
|
||||
import notify from '../../common/notify';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import render from '../../common/remote/activitypub/renderer/follow';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import render from '../../remote/activitypub/renderer/follow';
|
||||
import config from '../../conf';
|
||||
|
||||
export default ({ data }, done) => Following.findOne({ _id: data.following }).then(({ followerId, followeeId }) => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import User from '../../models/user';
|
||||
import act from '../../common/remote/activitypub/act';
|
||||
import act from '../../remote/activitypub/act';
|
||||
|
||||
export default ({ data }, done) => User.findOne({ _id: data.actor })
|
||||
.then(actor => act(actor, data.outbox))
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { JSDOM } from 'jsdom';
|
||||
import config from '../../../conf';
|
||||
import Post from '../../../models/post';
|
||||
import RemoteUserObject, { IRemoteUserObject } from '../../../models/remote-user-object';
|
||||
import uploadFromUrl from '../../drive/upload_from_url';
|
||||
import config from '../../conf';
|
||||
import Post from '../../models/post';
|
||||
import RemoteUserObject, { IRemoteUserObject } from '../../models/remote-user-object';
|
||||
import uploadFromUrl from '../../common/drive/upload-from-url';
|
||||
import Resolver from './resolver';
|
||||
const createDOMPurify = require('dompurify');
|
||||
|
@ -1,4 +1,4 @@
|
||||
import config from '../../../../conf';
|
||||
import config from '../../../conf';
|
||||
|
||||
export default ({ _id, contentType }) => ({
|
||||
type: 'Document',
|
@ -1,5 +1,5 @@
|
||||
import config from '../../../../conf';
|
||||
import { IRemoteUser } from '../../../../models/user';
|
||||
import config from '../../../conf';
|
||||
import { IRemoteUser } from '../../../models/user';
|
||||
|
||||
export default ({ username }, followee: IRemoteUser) => ({
|
||||
type: 'Follow',
|
@ -1,4 +1,4 @@
|
||||
import config from '../../../../conf';
|
||||
import config from '../../../conf';
|
||||
|
||||
export default tag => ({
|
||||
type: 'Hashtag',
|
@ -1,4 +1,4 @@
|
||||
import config from '../../../../conf';
|
||||
import config from '../../../conf';
|
||||
|
||||
export default ({ _id }) => ({
|
||||
type: 'Image',
|
@ -1,6 +1,6 @@
|
||||
import config from '../../../../conf';
|
||||
import { extractPublic } from '../../../../crypto_key';
|
||||
import { ILocalUser } from '../../../../models/user';
|
||||
import config from '../../../conf';
|
||||
import { extractPublic } from '../../../crypto_key';
|
||||
import { ILocalUser } from '../../../models/user';
|
||||
|
||||
export default (user: ILocalUser) => ({
|
||||
id: `${config.url}/@${user.username}/publickey`,
|
@ -1,9 +1,9 @@
|
||||
import renderDocument from './document';
|
||||
import renderHashtag from './hashtag';
|
||||
import config from '../../../../conf';
|
||||
import DriveFile from '../../../../models/drive-file';
|
||||
import Post from '../../../../models/post';
|
||||
import User from '../../../../models/user';
|
||||
import config from '../../../conf';
|
||||
import DriveFile from '../../../models/drive-file';
|
||||
import Post from '../../../models/post';
|
||||
import User from '../../../models/user';
|
||||
|
||||
export default async (user, post) => {
|
||||
const promisedFiles = DriveFile.find({ _id: { $in: post.mediaIds } });
|
@ -1,6 +1,6 @@
|
||||
import renderImage from './image';
|
||||
import renderKey from './key';
|
||||
import config from '../../../../conf';
|
||||
import config from '../../../conf';
|
||||
|
||||
export default user => {
|
||||
const id = `${config.url}/@${user.username}`;
|
@ -1,7 +1,7 @@
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { toUnicode } from 'punycode';
|
||||
import User, { validateUsername, isValidName, isValidDescription } from '../../../models/user';
|
||||
import queue from '../../../queue';
|
||||
import User, { validateUsername, isValidName, isValidDescription } from '../../models/user';
|
||||
import queue from '../../queue';
|
||||
import webFinger from '../webfinger';
|
||||
import create from './create';
|
||||
import Resolver from './resolver';
|
@ -1,4 +1,4 @@
|
||||
import RemoteUserObject from '../../../models/remote-user-object';
|
||||
import RemoteUserObject from '../../models/remote-user-object';
|
||||
import { IObject } from './type';
|
||||
const request = require('request-promise-native');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { toUnicode, toASCII } from 'punycode';
|
||||
import User from '../../models/user';
|
||||
import User from '../models/user';
|
||||
import resolvePerson from './activitypub/resolve-person';
|
||||
import webFinger from './webfinger';
|
||||
|
@ -3,7 +3,7 @@ import * as express from 'express';
|
||||
import { parseRequest, verifySignature } from 'http-signature';
|
||||
import User, { IRemoteUser } from '../../models/user';
|
||||
import queue from '../../queue';
|
||||
import parseAcct from '../../common/user/parse-acct';
|
||||
import parseAcct from '../../misc/user/parse-acct';
|
||||
|
||||
const app = express();
|
||||
app.disable('x-powered-by');
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as express from 'express';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import renderNote from '../../common/remote/activitypub/renderer/note';
|
||||
import renderOrderedCollection from '../../common/remote/activitypub/renderer/ordered-collection';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import renderNote from '../../remote/activitypub/renderer/note';
|
||||
import renderOrderedCollection from '../../remote/activitypub/renderer/ordered-collection';
|
||||
import config from '../../conf';
|
||||
import Post from '../../models/post';
|
||||
import withUser from './with-user';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as express from 'express';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import render from '../../common/remote/activitypub/renderer/note';
|
||||
import parseAcct from '../../common/user/parse-acct';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import render from '../../remote/activitypub/renderer/note';
|
||||
import parseAcct from '../../misc/user/parse-acct';
|
||||
import Post from '../../models/post';
|
||||
import User from '../../models/user';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as express from 'express';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import render from '../../common/remote/activitypub/renderer/key';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import render from '../../remote/activitypub/renderer/key';
|
||||
import config from '../../conf';
|
||||
import withUser from './with-user';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as express from 'express';
|
||||
import config from '../../conf';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import render from '../../common/remote/activitypub/renderer/person';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import render from '../../remote/activitypub/renderer/person';
|
||||
import withUser from './with-user';
|
||||
|
||||
const respond = withUser(username => `${config.url}/@${username}`, (user, req, res) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import parseAcct from '../../common/user/parse-acct';
|
||||
import parseAcct from '../../misc/user/parse-acct';
|
||||
import User from '../../models/user';
|
||||
|
||||
export default (redirect, respond) => async (req, res, next) => {
|
||||
|
@ -3,10 +3,10 @@ import * as bcrypt from 'bcryptjs';
|
||||
|
||||
import User, { IUser, init as initUser, ILocalUser } from '../../../models/user';
|
||||
|
||||
import getPostSummary from '../../../common/get-post-summary';
|
||||
import getUserSummary from '../../../common/user/get-summary';
|
||||
import parseAcct from '../../../common/user/parse-acct';
|
||||
import getNotificationSummary from '../../../common/get-notification-summary';
|
||||
import getPostSummary from '../../../misc/get-post-summary';
|
||||
import getUserSummary from '../../../misc/user/get-summary';
|
||||
import parseAcct from '../../../misc/user/parse-acct';
|
||||
import getNotificationSummary from '../../../misc/get-notification-summary';
|
||||
|
||||
const hmm = [
|
||||
'?',
|
||||
|
@ -7,9 +7,9 @@ import config from '../../../../conf';
|
||||
import BotCore from '../core';
|
||||
import _redis from '../../../../db/redis';
|
||||
import prominence = require('prominence');
|
||||
import getAcct from '../../../../common/user/get-acct';
|
||||
import parseAcct from '../../../../common/user/parse-acct';
|
||||
import getPostSummary from '../../../../common/get-post-summary';
|
||||
import getAcct from '../../../../misc/user/get-acct';
|
||||
import parseAcct from '../../../../misc/user/parse-acct';
|
||||
import getPostSummary from '../../../../misc/get-post-summary';
|
||||
|
||||
const redis = prominence(_redis);
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
import $ from 'cafy';
|
||||
import { pack } from '../../../../../models/drive-file';
|
||||
import uploadFromUrl from '../../../../../common/drive/upload_from_url';
|
||||
import uploadFromUrl from '../../../../../common/drive/upload-from-url';
|
||||
|
||||
/**
|
||||
* Create a file from a URL
|
||||
|
@ -1,6 +1,6 @@
|
||||
import $ from 'cafy';
|
||||
import OthelloGame, { pack } from '../../../../../models/othello-game';
|
||||
import Othello from '../../../../../common/othello/core';
|
||||
import Othello from '../../../../../misc/othello/core';
|
||||
|
||||
module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
// Get 'gameId' parameter
|
||||
|
@ -3,7 +3,7 @@ import Matching, { pack as packMatching } from '../../../../models/othello-match
|
||||
import OthelloGame, { pack as packGame } from '../../../../models/othello-game';
|
||||
import User from '../../../../models/user';
|
||||
import publishUserStream, { publishOthelloStream } from '../../../../common/event';
|
||||
import { eighteight } from '../../../../common/othello/maps';
|
||||
import { eighteight } from '../../../../misc/othello/maps';
|
||||
|
||||
module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
// Get 'userId' parameter
|
||||
|
@ -17,8 +17,8 @@ import { pack } from '../../../../models/post';
|
||||
import watch from '../../common/watch-post';
|
||||
import event, { pushSw, publishChannelStream } from '../../../../common/event';
|
||||
import notify from '../../../../common/notify';
|
||||
import getAcct from '../../../../common/user/get-acct';
|
||||
import parseAcct from '../../../../common/user/parse-acct';
|
||||
import getAcct from '../../../../misc/user/get-acct';
|
||||
import parseAcct from '../../../../misc/user/parse-acct';
|
||||
import config from '../../../../conf';
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
import $ from 'cafy';
|
||||
import User, { pack } from '../../../../models/user';
|
||||
import resolveRemoteUser from '../../../../common/remote/resolve-user';
|
||||
import resolveRemoteUser from '../../../../remote/resolve-user';
|
||||
|
||||
const cursorOption = { fields: { data: false } };
|
||||
|
||||
|
@ -3,7 +3,7 @@ import * as debug from 'debug';
|
||||
import limiterDB from '../../db/redis';
|
||||
import { Endpoint } from './endpoints';
|
||||
import { IAuthContext } from './authenticate';
|
||||
import getAcct from '../../common/user/get-acct';
|
||||
import getAcct from '../../misc/user/get-acct';
|
||||
|
||||
const log = debug('misskey:limitter');
|
||||
|
||||
|
@ -3,8 +3,8 @@ import * as redis from 'redis';
|
||||
import * as CRC32 from 'crc-32';
|
||||
import OthelloGame, { pack } from '../../../models/othello-game';
|
||||
import { publishOthelloGameStream } from '../../../common/event';
|
||||
import Othello from '../../../common/othello/core';
|
||||
import * as maps from '../../../common/othello/maps';
|
||||
import Othello from '../../../misc/othello/core';
|
||||
import * as maps from '../../../misc/othello/maps';
|
||||
import { ParsedUrlQuery } from 'querystring';
|
||||
|
||||
export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user?: any): void {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import config from '../conf';
|
||||
import parseAcct from '../common/user/parse-acct';
|
||||
import parseAcct from '../misc/user/parse-acct';
|
||||
import User from '../models/user';
|
||||
const express = require('express');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user