cleo ide moment
This commit is contained in:
parent
df1359e392
commit
8ab290b708
|
@ -1,17 +1,18 @@
|
|||
import {In, Not} from 'typeorm';
|
||||
import { URL } from 'url';
|
||||
import { In, Not } from 'typeorm';
|
||||
import Ajv from 'ajv';
|
||||
import {ILocalUser, IRemoteUser, User} from '@/models/entities/user.js';
|
||||
import type { ILocalUser, IRemoteUser } from '@/models/entities/user.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import config from '@/config/index.js';
|
||||
import {Packed} from '@/misc/schema.js';
|
||||
import {awaitAll, Promiseable} from '@/prelude/await-all.js';
|
||||
import {populateEmojis} from '@/misc/populate-emojis.js';
|
||||
import {getAntennas} from '@/misc/antenna-cache.js';
|
||||
import {USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD} from '@/const.js';
|
||||
import {Cache} from '@/misc/cache.js';
|
||||
import {db} from '@/db/postgre.js';
|
||||
import {Instance} from '../entities/instance.js';
|
||||
import {resolveUser} from "@/remote/resolve-user";
|
||||
import {URL} from "url";
|
||||
import type { Packed } from '@/misc/schema.js';
|
||||
import type { Promiseable } from '@/prelude/await-all.js';
|
||||
import { awaitAll } from '@/prelude/await-all.js';
|
||||
import { populateEmojis } from '@/misc/populate-emojis.js';
|
||||
import { getAntennas } from '@/misc/antenna-cache.js';
|
||||
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const.js';
|
||||
import { Cache } from '@/misc/cache.js';
|
||||
import { db } from '@/db/postgre.js';
|
||||
import { resolveUser } from '@/remote/resolve-user.js';
|
||||
import {
|
||||
AnnouncementReads,
|
||||
Announcements,
|
||||
|
@ -31,8 +32,9 @@ import {
|
|||
UserGroupJoinings,
|
||||
UserNotePinings,
|
||||
UserProfiles,
|
||||
UserSecurityKeys
|
||||
UserSecurityKeys,
|
||||
} from '../index.js';
|
||||
import type { Instance } from '../entities/instance.js';
|
||||
|
||||
const userInstanceCache = new Cache<Instance | null>(1000 * 60 * 60 * 3);
|
||||
|
||||
|
@ -185,10 +187,10 @@ export const UserRepository = db.getRepository(User).extend({
|
|||
return await resolveUser(id, null);
|
||||
}
|
||||
|
||||
let url = new URL(uri);
|
||||
const url = new URL(uri);
|
||||
let userTag = url.pathname;
|
||||
|
||||
if (userTag.startsWith("@")) {
|
||||
if (userTag.startsWith('@')) {
|
||||
userTag = userTag.substring(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue