Fix packGrouped
This commit is contained in:
parent
3693ce9f00
commit
ff7f7c8835
|
@ -161,7 +161,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
meId: MiUser['id'],
|
meId: MiUser['id'],
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
options: {
|
options: {
|
||||||
|
checkValidNotifier?: boolean;
|
||||||
},
|
},
|
||||||
hint?: {
|
hint?: {
|
||||||
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
|
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
|
||||||
|
@ -170,7 +170,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
): Promise<Packed<'Notification'>|null> {
|
): Promise<Packed<'Notification'>|null> {
|
||||||
const notification = src;
|
const notification = src;
|
||||||
|
|
||||||
if (!(await this.#isValidNotifier(notification, meId))) return null;
|
if ( options.checkValidNotifier && !(await this.#isValidNotifier(notification, meId))) return null;
|
||||||
|
|
||||||
const noteIfNeed = NOTE_REQUIRED_GROUPED_NOTIFICATION_TYPES.has(notification.type) && 'noteId' in notification ? (
|
const noteIfNeed = NOTE_REQUIRED_GROUPED_NOTIFICATION_TYPES.has(notification.type) && 'noteId' in notification ? (
|
||||||
hint?.packedNotes != null
|
hint?.packedNotes != null
|
||||||
|
|
Loading…
Reference in New Issue