hippofish/packages/backend/src/misc/is-reply.ts

11 lines
331 B
TypeScript
Raw Normal View History

/*
2024-02-12 03:37:45 +01:00
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { MiUser } from '@/models/User.js';
export function isReply(note: any, viewerId?: MiUser['id'] | undefined | null): boolean {
return note.replyId && note.replyUserId !== note.userId && note.replyUserId !== viewerId;
}