mirror of
https://github.com/misskey-dev/misskey
synced 2024-12-05 10:18:42 +09:00
Merge branches 'develop', 'develop' and 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
8caf853c80
@ -48,7 +48,7 @@ export interface INotification {
|
|||||||
/**
|
/**
|
||||||
* 通知が読まれたかどうか
|
* 通知が読まれたかどうか
|
||||||
*/
|
*/
|
||||||
isRead: Boolean;
|
isRead: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const packMany = (
|
export const packMany = (
|
||||||
|
@ -164,7 +164,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU
|
|||||||
uri: person.id,
|
uri: person.id,
|
||||||
url: person.url,
|
url: person.url,
|
||||||
isBot: isBot,
|
isBot: isBot,
|
||||||
isCat: (person as any).isCat === true ? true : false
|
isCat: (person as any).isCat === true
|
||||||
}) as IRemoteUser;
|
}) as IRemoteUser;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// duplicate key error
|
// duplicate key error
|
||||||
@ -322,7 +322,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
|
|||||||
url: person.url,
|
url: person.url,
|
||||||
endpoints: person.endpoints,
|
endpoints: person.endpoints,
|
||||||
isBot: object.type == 'Service',
|
isBot: object.type == 'Service',
|
||||||
isCat: (person as any).isCat === true ? true : false,
|
isCat: (person as any).isCat === true
|
||||||
isLocked: person.manuallyApprovesFollowers,
|
isLocked: person.manuallyApprovesFollowers,
|
||||||
createdAt: Date.parse(person.published) || null,
|
createdAt: Date.parse(person.published) || null,
|
||||||
publicKey: {
|
publicKey: {
|
||||||
|
@ -106,9 +106,7 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
|
|||||||
|
|
||||||
const withFiles = ps.withFiles != undefined ? ps.withFiles : ps.media;
|
const withFiles = ps.withFiles != undefined ? ps.withFiles : ps.media;
|
||||||
|
|
||||||
if (withFiles) {
|
if (withFiles) query.fileIds = { $exists: true, $ne: null };
|
||||||
query.fileIds = withFiles ? { $exists: true, $ne: null } : [];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ps.poll != undefined) {
|
if (ps.poll != undefined) {
|
||||||
query.poll = ps.poll ? { $exists: true, $ne: null } : null;
|
query.poll = ps.poll ? { $exists: true, $ne: null } : null;
|
||||||
|
@ -30,7 +30,7 @@ async function genVars(lang: string): Promise<{ [key: string]: any }> {
|
|||||||
|
|
||||||
const entities = glob.sync('src/docs/api/entities/**/*.yaml', { cwd });
|
const entities = glob.sync('src/docs/api/entities/**/*.yaml', { cwd });
|
||||||
vars['entities'] = entities.map(x => {
|
vars['entities'] = entities.map(x => {
|
||||||
const _x = yaml.safeLoad(fs.readFileSync(cwd + x, 'utf-8')) as any;
|
const _x = yaml.safeLoad(fs.readFileSync(cwd + x, 'utf-8'));
|
||||||
return _x.name;
|
return _x.name;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ router.get('/*/api/entities/*', async ctx => {
|
|||||||
const lang = ctx.params[0];
|
const lang = ctx.params[0];
|
||||||
const entity = ctx.params[1];
|
const entity = ctx.params[1];
|
||||||
|
|
||||||
const x = yaml.safeLoad(fs.readFileSync(path.resolve(`${__dirname}/../../../src/docs/api/entities/${entity}.yaml`), 'utf-8')) as any;
|
const x = yaml.safeLoad(fs.readFileSync(path.resolve(`${__dirname}/../../../src/docs/api/entities/${entity}.yaml`), 'utf-8'));
|
||||||
|
|
||||||
await ctx.render('../../../../src/docs/api/entities/view', Object.assign(await genVars(lang), {
|
await ctx.render('../../../../src/docs/api/entities/view', Object.assign(await genVars(lang), {
|
||||||
id: `api/entities/${entity}`,
|
id: `api/entities/${entity}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user