Ignore old messages

This commit is contained in:
Pedro Lopez 2019-02-17 23:24:54 -04:00
commit f585cc1c5a

View file

@ -49,7 +49,7 @@ class Client extends EventEmitter {
}
await page.exposeFunction('onAddMessageEvent', msg => {
if (msg.id.fromMe) return;
if (msg.id.fromMe || !msg.isNewMsg) return;
this.emit(Events.MESSAGE_CREATE, new Message(this, msg));
});