lint
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
* https://en.wikipedia.org/wiki/Identicon
|
||||
*/
|
||||
|
||||
import { WriteStream } from 'node:fs';
|
||||
import * as p from 'pureimage';
|
||||
import gen from 'random-seed';
|
||||
import type { WriteStream } from 'node:fs';
|
||||
|
||||
const size = 128; // px
|
||||
const n = 5; // resolution
|
||||
|
@@ -1,15 +1,15 @@
|
||||
import { Packed } from './schema.js';
|
||||
import type { Packed } from './schema.js';
|
||||
|
||||
export function isInstanceMuted(note: Packed<'Note'>, mutedInstances: Set<string>): boolean {
|
||||
if (mutedInstances.has(note?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(note?.reply?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(note?.renote?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(note.user.host ?? '')) return true;
|
||||
if (mutedInstances.has(note.reply?.user.host ?? '')) return true;
|
||||
if (mutedInstances.has(note.renote?.user.host ?? '')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function isUserFromMutedInstance(notif: Packed<'Notification'>, mutedInstances: Set<string>): boolean {
|
||||
if (mutedInstances.has(notif?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(notif.user?.host ?? '')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Note } from '@/models/entities/Note.js';
|
||||
import type { Note } from '@/models/entities/Note.js';
|
||||
|
||||
export default function(note: Note): boolean {
|
||||
return note.renoteId != null && (note.text != null || note.hasPoll || (note.fileIds != null && note.fileIds.length > 0));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import * as os from 'node:os';
|
||||
import sysUtils from 'systeminformation';
|
||||
import Logger from '@/core/logger.js';
|
||||
import type Logger from '@/logger.js';
|
||||
|
||||
export async function showMachineInfo(parentLogger: Logger) {
|
||||
const logger = parentLogger.createSubLogger('machine');
|
||||
|
Reference in New Issue
Block a user