diff --git a/backend/src/modules/post/post.dto.ts b/backend/src/modules/post/post.dto.ts index 88856d0..af1a719 100644 --- a/backend/src/modules/post/post.dto.ts +++ b/backend/src/modules/post/post.dto.ts @@ -12,4 +12,6 @@ export class ICreatePost { export class IEditPost { @ApiProperty({ description: 'Post text', example: 'Post text' }) readonly text!: string; + + @ApiProperty({ description: 'Message entities of text', example: '[]' }) readonly message_entities?: string; } diff --git a/backend/src/modules/post/post.service.ts b/backend/src/modules/post/post.service.ts index 0694539..12fe572 100644 --- a/backend/src/modules/post/post.service.ts +++ b/backend/src/modules/post/post.service.ts @@ -60,8 +60,9 @@ export class PostService { throw new HttpException('There are only ' + posts.length + ' unsent messages.', HttpStatus.BAD_REQUEST); } const post = posts[Math.abs(+order) - 1]; - if (post.text !== data.text) { + if (post.text !== data.text || post.message_entities !== data.message_entities) { post.text = data.text; + post.message_entities = data.message_entities; post.edit_timestamp = new Date(); await this.postRepository.save(post); } diff --git a/neuro-reply-bot-reworked b/neuro-reply-bot-reworked index 5195325..5b0580b 160000 --- a/neuro-reply-bot-reworked +++ b/neuro-reply-bot-reworked @@ -1 +1 @@ -Subproject commit 5195325fd33dd39db0ebd2845459a9070da03a94 +Subproject commit 5b0580b477a6380023425fb4e6d24659a871046e