diff --git a/src/parser/classes/menus/MultiPageMenuNotificationSection.ts b/src/parser/classes/menus/MultiPageMenuNotificationSection.ts index 9c80af9f..444eb55f 100644 --- a/src/parser/classes/menus/MultiPageMenuNotificationSection.ts +++ b/src/parser/classes/menus/MultiPageMenuNotificationSection.ts @@ -1,15 +1,24 @@ -import { Parser } from '../../index.js'; import { type ObservedArray, YTNode } from '../../helpers.js'; -import type { RawNode } from '../../index.js'; +import { Parser, type RawNode } from '../../index.js'; +import ContinuationItem from '../ContinuationItem.js'; +import Message from '../Message.js'; +import Notification from '../Notification.js'; +import Text from '../misc/Text.js'; export default class MultiPageMenuNotificationSection extends YTNode { static type = 'MultiPageMenuNotificationSection'; - public items: ObservedArray; + public notification_section_title?: Text; + public items: ObservedArray; constructor(data: RawNode) { super(); - this.items = Parser.parseArray(data.items); + + if ('notificationSectionTitle' in data) { + this.notification_section_title = new Text(data.notificationSectionTitle); + } + + this.items = Parser.parseArray(data.items, [ Notification, Message, ContinuationItem ]); } // XXX: Alias for consistency. diff --git a/src/parser/classes/mweb/MultiPageMenuSection.ts b/src/parser/classes/mweb/MultiPageMenuSection.ts index 138feb53..e6bc64f5 100644 --- a/src/parser/classes/mweb/MultiPageMenuSection.ts +++ b/src/parser/classes/mweb/MultiPageMenuSection.ts @@ -5,7 +5,7 @@ import { Parser, type RawNode } from '../../index.js'; export default class MultiPageMenuSection extends YTNode { static type = 'MultiPageMenuSection'; - public items: ObservedArray | null; + public items: ObservedArray; constructor(data: RawNode) { super();