fix lints
This commit is contained in:
parent
6f8e3fe366
commit
a5241379af
5 changed files with 3 additions and 5 deletions
|
@ -18,7 +18,7 @@ export async function checkWordMute(note: NoteLike, me: UserLike | null | undefi
|
||||||
if (mutedWords.length > 0) {
|
if (mutedWords.length > 0) {
|
||||||
const text = ((note.cw ?? '') + '\n' + (note.text ?? '')).trim();
|
const text = ((note.cw ?? '') + '\n' + (note.text ?? '')).trim();
|
||||||
|
|
||||||
if (text == '') return false;
|
if (text === '') return false;
|
||||||
|
|
||||||
const matched = mutedWords.some(filter => {
|
const matched = mutedWords.some(filter => {
|
||||||
if (Array.isArray(filter)) {
|
if (Array.isArray(filter)) {
|
||||||
|
|
|
@ -201,7 +201,7 @@ export interface IApMention extends IObject {
|
||||||
href: string;
|
href: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isMention = (object: IObject): object is IApMention=>
|
export const isMention = (object: IObject): object is IApMention =>
|
||||||
getApType(object) === 'Mention' &&
|
getApType(object) === 'Mention' &&
|
||||||
typeof object.href === 'string';
|
typeof object.href === 'string';
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ ajv.addFormat('misskey:id', /^[a-zA-Z0-9]+$/);
|
||||||
|
|
||||||
export default function <T extends IEndpointMeta, Ps extends Schema>(meta: T, paramDef: Ps, cb: executor<T, Ps>)
|
export default function <T extends IEndpointMeta, Ps extends Schema>(meta: T, paramDef: Ps, cb: executor<T, Ps>)
|
||||||
: (params: any, user: T['requireCredential'] extends true ? CacheableLocalUser : CacheableLocalUser | null, token: AccessToken | null, file?: any) => Promise<any> {
|
: (params: any, user: T['requireCredential'] extends true ? CacheableLocalUser : CacheableLocalUser | null, token: AccessToken | null, file?: any) => Promise<any> {
|
||||||
|
|
||||||
const validate = ajv.compile(paramDef);
|
const validate = ajv.compile(paramDef);
|
||||||
|
|
||||||
return (params: any, user: T['requireCredential'] extends true ? CacheableLocalUser : CacheableLocalUser | null, token: AccessToken | null, file?: any) => {
|
return (params: any, user: T['requireCredential'] extends true ? CacheableLocalUser : CacheableLocalUser | null, token: AccessToken | null, file?: any) => {
|
||||||
|
|
|
@ -14,7 +14,6 @@ export async function deliverQuestionUpdate(noteId: Note['id']) {
|
||||||
if (user == null) throw new Error('note not found');
|
if (user == null) throw new Error('note not found');
|
||||||
|
|
||||||
if (Users.isLocalUser(user)) {
|
if (Users.isLocalUser(user)) {
|
||||||
|
|
||||||
const content = renderActivity(renderUpdate(await renderNote(note, false), user));
|
const content = renderActivity(renderUpdate(await renderNote(note, false), user));
|
||||||
deliverToFollowers(user, content);
|
deliverToFollowers(user, content);
|
||||||
deliverToRelays(user, content);
|
deliverToRelays(user, content);
|
||||||
|
|
|
@ -5,7 +5,7 @@ export function checkWordMute(note: Record<string, any>, me: Record<string, any>
|
||||||
if (mutedWords.length > 0) {
|
if (mutedWords.length > 0) {
|
||||||
const text = ((note.cw ?? '') + '\n' + (note.text ?? '')).trim();
|
const text = ((note.cw ?? '') + '\n' + (note.text ?? '')).trim();
|
||||||
|
|
||||||
if (text == '') return false;
|
if (text === '') return false;
|
||||||
|
|
||||||
const matched = mutedWords.some(filter => {
|
const matched = mutedWords.some(filter => {
|
||||||
if (Array.isArray(filter)) {
|
if (Array.isArray(filter)) {
|
||||||
|
|
Loading…
Reference in a new issue