diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-12-02 20:11:03 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-12-02 20:11:03 +0900 |
| commit | 8caf853c8008d605657650a4ca70c031f31158fe (patch) | |
| tree | 2ef84933258c38c966405ddfdc72651d485b3ac4 /src | |
| parent | Improve input dialog (diff) | |
| parent | Use primitive type boolean (#3474) (diff) | |
| download | misskey-8caf853c8008d605657650a4ca70c031f31158fe.tar.gz misskey-8caf853c8008d605657650a4ca70c031f31158fe.tar.bz2 misskey-8caf853c8008d605657650a4ca70c031f31158fe.zip | |
Merge branches 'develop', 'develop' and 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src')
| -rw-r--r-- | src/models/notification.ts | 2 | ||||
| -rw-r--r-- | src/remote/activitypub/models/person.ts | 4 | ||||
| -rw-r--r-- | src/server/api/endpoints/notes.ts | 4 | ||||
| -rw-r--r-- | src/server/web/docs.ts | 4 |
4 files changed, 6 insertions, 8 deletions
diff --git a/src/models/notification.ts b/src/models/notification.ts index 394e49f36a..5cf1e140c8 100644 --- a/src/models/notification.ts +++ b/src/models/notification.ts @@ -48,7 +48,7 @@ export interface INotification { /** * 通知が読まれたかどうか */ - isRead: Boolean; + isRead: boolean; } export const packMany = ( diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 74fcdc10a2..2bd0eaf250 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -164,7 +164,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU uri: person.id, url: person.url, isBot: isBot, - isCat: (person as any).isCat === true ? true : false + isCat: (person as any).isCat === true }) as IRemoteUser; } catch (e) { // duplicate key error @@ -322,7 +322,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje url: person.url, endpoints: person.endpoints, isBot: object.type == 'Service', - isCat: (person as any).isCat === true ? true : false, + isCat: (person as any).isCat === true isLocked: person.manuallyApprovesFollowers, createdAt: Date.parse(person.published) || null, publicKey: { diff --git a/src/server/api/endpoints/notes.ts b/src/server/api/endpoints/notes.ts index f7b7b65ca4..b489197076 100644 --- a/src/server/api/endpoints/notes.ts +++ b/src/server/api/endpoints/notes.ts @@ -106,9 +106,7 @@ export default define(meta, (ps) => new Promise(async (res, rej) => { const withFiles = ps.withFiles != undefined ? ps.withFiles : ps.media; - if (withFiles) { - query.fileIds = withFiles ? { $exists: true, $ne: null } : []; - } + if (withFiles) query.fileIds = { $exists: true, $ne: null }; if (ps.poll != undefined) { query.poll = ps.poll ? { $exists: true, $ne: null } : null; diff --git a/src/server/web/docs.ts b/src/server/web/docs.ts index b535a236dd..9cc54cdf0b 100644 --- a/src/server/web/docs.ts +++ b/src/server/web/docs.ts @@ -30,7 +30,7 @@ async function genVars(lang: string): Promise<{ [key: string]: any }> { const entities = glob.sync('src/docs/api/entities/**/*.yaml', { cwd }); 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; }); @@ -197,7 +197,7 @@ router.get('/*/api/entities/*', async ctx => { const lang = ctx.params[0]; 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), { id: `api/entities/${entity}`, |