Schmavery / facebook-chat-api

Unofficial Facebook Chat API for Nodejs
MIT License
1.93k stars 596 forks source link

message_unsend event never appears #718

Open PixelHir opened 5 years ago

PixelHir commented 5 years ago

Even though I have listenEvents: true, I receive every event except the unsend. I've put a console.log(event) and nothing happens when removing a message.

BadAimWeeb commented 5 years ago

image I can still get the unsend event with current GitHub code. Maybe you want to try npm i Schmavery/facebook-chat-api in your folder contains your code.

PixelHir commented 5 years ago

Nope, I was already on a newest version. https://i.imgur.com/o5DPjVk.gifv

BadAimWeeb commented 5 years ago

Hmm... can you show me your full code?

PixelHir commented 5 years ago

Hmm... can you show me your full code?

https://github.com/PixelHir/jan-zamachowski bot.js, the only difference is that there is no console.log

BadAimWeeb commented 5 years ago

I see. Well, unsend event have its own event type message_unsend. You want to add that event type in switch..case too.

PixelHir commented 5 years ago

Yeah, however the console.log was added before switch to list all events for debug purposes, it isnt in the code as I said above

PixelHir commented 5 years ago

tested this once again, this time with starting from scratch, used code below:

`const fb = require('facebook-chat-api');

fb({email: '---', password: '---'}, (err, api) => { api.listen((err, msg) => { console.log(msg.type); }); });`

hong4rc commented 5 years ago

I think message_unsend can't send to another user that you don't read it, It just marks in your browser

PixelHir commented 5 years ago

The only thing I can think of is that message_unsend is handled in a different way on some accounts.

BadAimWeeb commented 5 years ago

Maybe you want to try on a different account.