refactor: Use ===
This commit is contained in:
parent
fef5ec874b
commit
d4a630902d
39 changed files with 69 additions and 69 deletions
|
|
@ -293,7 +293,7 @@ export async function createNote(value: string | IObject, resolver?: Resolver, s
|
|||
* リモートサーバーからフェッチしてMisskeyに登録しそれを返します。
|
||||
*/
|
||||
export async function resolveNote(value: string | IObject, resolver?: Resolver): Promise<Note | null> {
|
||||
const uri = typeof value == 'string' ? value : value.id;
|
||||
const uri = typeof value === 'string' ? value : value.id;
|
||||
if (uri == null) throw new Error('missing uri');
|
||||
|
||||
// ブロックしてたら中断
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
|
|||
|
||||
const tags = extractApHashtags(person.tag).map(tag => tag.toLowerCase()).splice(0, 32);
|
||||
|
||||
const isBot = object.type == 'Service';
|
||||
const isBot = object.type === 'Service';
|
||||
|
||||
// Create user
|
||||
let user: IRemoteUser;
|
||||
|
|
@ -327,7 +327,7 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint
|
|||
emojis: emojiNames,
|
||||
name: person.name,
|
||||
tags,
|
||||
isBot: object.type == 'Service',
|
||||
isBot: object.type === 'Service',
|
||||
isCat: (person as any).isCat === true,
|
||||
isLocked: !!person.manuallyApprovesFollowers,
|
||||
} as Partial<User>;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export async function extractPollFromQuestion(source: string | IObject, resolver
|
|||
* @returns true if updated
|
||||
*/
|
||||
export async function updateQuestion(value: any) {
|
||||
const uri = typeof value == 'string' ? value : value.id;
|
||||
const uri = typeof value === 'string' ? value : value.id;
|
||||
|
||||
// URIがこのサーバーを指しているならスキップ
|
||||
if (uri.startsWith(config.url + '/')) throw new Error('uri points local');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue