Compare commits

...

3 Commits

Author SHA1 Message Date
Kisaragi
ea9c3239e5 fix nullability 2025-03-06 20:59:36 +09:00
Kisaragi
b8fde212ad Update is-reply.ts 2025-03-06 19:56:27 +09:00
Kisaragi
01cb14f78d refactor: avoid any 2025-03-06 19:41:30 +09:00

View File

@@ -4,7 +4,8 @@
*/
import { MiUser } from '@/models/User.js';
import { MiNote } from '@/models/Note.js';
export function isReply(note: any, viewerId?: MiUser['id'] | undefined | null): boolean {
return note.replyId && note.replyUserId !== note.userId && note.replyUserId !== viewerId;
export function isReply(note: MiNote, viewerId?: MiUser['id'] | undefined | null): boolean {
return note.replyId !== undefined && note.replyUserId !== note.userId && note.replyUserId !== viewerId;
}