fix typo in assertDialogAnnouncementsCountLimit method name

This commit is contained in:
bunnybeam 2025-09-04 16:33:30 +01:00
parent 5364e8da26
commit 32d45883d6
No known key found for this signature in database

View file

@ -73,7 +73,7 @@ export class AnnouncementService {
@bindThis @bindThis
public async create(values: Partial<MiAnnouncement>, moderator?: MiUser): Promise<{ raw: MiAnnouncement; packed: Packed<'Announcement'> }> { public async create(values: Partial<MiAnnouncement>, moderator?: MiUser): Promise<{ raw: MiAnnouncement; packed: Packed<'Announcement'> }> {
if (values.display === 'dialog') { if (values.display === 'dialog') {
await this.assertDialogAnnouncenmentsCountLimit(); await this.assertDialogAnnouncementsCountLimit();
} }
const announcement = await this.announcementsRepository.insertOne({ const announcement = await this.announcementsRepository.insertOne({
@ -131,7 +131,7 @@ export class AnnouncementService {
public async update(announcement: MiAnnouncement, values: Partial<MiAnnouncement>, moderator?: MiUser): Promise<void> { public async update(announcement: MiAnnouncement, values: Partial<MiAnnouncement>, moderator?: MiUser): Promise<void> {
// Check if this operation would produce an active dialog announcement // Check if this operation would produce an active dialog announcement
if ((values.display ?? announcement.display) === 'dialog' && (values.isActive ?? announcement.isActive)) { if ((values.display ?? announcement.display) === 'dialog' && (values.isActive ?? announcement.isActive)) {
await this.assertDialogAnnouncenmentsCountLimit(); await this.assertDialogAnnouncementsCountLimit();
} }
await this.announcementsRepository.update(announcement.id, { await this.announcementsRepository.update(announcement.id, {
@ -237,7 +237,7 @@ export class AnnouncementService {
} }
} }
private async assertDialogAnnouncenmentsCountLimit(): Promise<void> { private async assertDialogAnnouncementsCountLimit(): Promise<void> {
// Check how many active dialog queries already exist, to enforce a limit // Check how many active dialog queries already exist, to enforce a limit
const dialogCount = await this.announcementsRepository.createQueryBuilder('announcement') const dialogCount = await this.announcementsRepository.createQueryBuilder('announcement')
.where({ .where({