Fix loading history with sponsored message

This commit is contained in:
Eduard Kuzmenko 2022-04-06 01:36:16 +03:00
parent 881ecd6207
commit f082d0170e
2 changed files with 4 additions and 3 deletions

4
.env
View File

@ -1,5 +1,5 @@
API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.4.1
VERSION_FULL=1.4.1 (152)
BUILD=152
VERSION_FULL=1.4.1 (153)
BUILD=153

View File

@ -1751,7 +1751,8 @@ export default class ChatBubbles {
}
// warning, если иды только отрицательные то вниз не попадёт (хотя мб и так не попадёт)
const history = Object.keys(this.bubbles).map(id => +id).sort((a, b) => a - b);
// some messages can have negative id (such as sponsored message)
const history = Object.keys(this.bubbles).map(id => +id).sort((a, b) => a - b).filter(id => id > 0);
if(!history.length) return;
if(top) {