@@ -7,7 +7,7 @@ import { LINK_PREFIX } from "./functions.js";
7
7
8
8
import { Attachment , ParsedAttachments , AttachmentFields } from "../interfaces" ;
9
9
10
- const { AUDIO , DOCUMENT , LINK , PHOTO , POLL , VIDEO , ALBUM } = AttachmentType ;
10
+ const { AUDIO , DOCUMENT , LINK , PHOTO , POLL , VIDEO , ALBUM , MARKET , MARKET_ALBUM } = AttachmentType ;
11
11
12
12
export class Attachments {
13
13
@@ -23,7 +23,7 @@ export class Attachments {
23
23
const attachmentFields : AttachmentFields = [ ] ;
24
24
25
25
const parsedAttachments = (
26
- attachments . map ( ( { type, photo, video, link, doc, audio, poll, album, textlive } ) => {
26
+ attachments . map ( ( { type, photo, video, link, doc, audio, poll, album, textlive, market } ) => {
27
27
switch ( type ) {
28
28
case PHOTO : {
29
29
const { sizes } = photo ;
@@ -90,6 +90,16 @@ export class Attachments {
90
90
91
91
return `[🖼️ Альбом: ${ title } ](${ LINK_PREFIX } ${ ALBUM } ${ owner_id } _${ id } )` ;
92
92
}
93
+ case MARKET : {
94
+ const { owner_id, id, title } = market ;
95
+
96
+ return `[🛍️ Товар: ${ title } ](${ LINK_PREFIX } ${ MARKET } ${ owner_id } ?w=product${ owner_id } _${ id } )` ;
97
+ }
98
+ case MARKET_ALBUM : {
99
+ const { owner_id, id, title } = market ;
100
+
101
+ return `[🛍️ Подборка товаров: ${ title } ](${ LINK_PREFIX } ${ MARKET } ${ owner_id } ?section=${ ALBUM } _${ id } )` ;
102
+ }
93
103
case "textlive" : {
94
104
const { textlive_id, title } = textlive ;
95
105
0 commit comments