Check for swipes before trying to record

This commit is contained in:
SillyLossy
2023-04-22 17:37:32 +03:00
parent f6ed23d29d
commit e4f8aa310d

View File

@ -1260,7 +1260,7 @@ class StreamingProcessor {
setFirstSwipe(messageId) {
if (this.type !== 'swipe' && this.type !== 'impersonate') {
if (chat[messageId]['swipes'].length === 1 && chat[messageId]['swipe_id'] === 0) {
if (Array.isArray(chat[messageId]['swipes']) && chat[messageId]['swipes'].length === 1 && chat[messageId]['swipe_id'] === 0) {
chat[messageId]['swipes'][0] = chat[messageId]['mes'];
}
}