Message entities in editing post

This commit is contained in:
2024-02-06 12:42:08 +03:00
parent a42dd9501b
commit 20d0335364
3 changed files with 5 additions and 2 deletions

View File

@@ -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);
}