Closed realrecordzLab closed 3 years ago
- Is necessary to call the
ig.realtime.connect({ irisData: await ig.feed.directInbox().request() });
method to listen for new messages?
It is necessary because you need to open a TLS connection to Instagram.
- Is this the right method to get new messages from DM inbox?
It is.
In my console log I've found this log about an event, but it's not a new message.
It logs the update of a message in this case (event: patch
, op: replace
, /has_seen
).
Btw, I don't think you need to use setInterval
to prevent Node from exiting. The open client should already prevent it.
It logs the update of a message in this case (
event: patch
,op: replace
,/has_seen
).
But I don't have new messages if I open instagram inbox , it's an event related to the messages reading form the user who receive it?
Btw, I don't think you need to use
setInterval
to prevent Node from exiting. The open client should already prevent it.
I'm using set interval because I'm calling a child script. I've tried to remove it but the script will terminate
UPDATE
Tested also without setInterval
and the script seems to continue runnig :)
it's an event related to the messages reading form the user who receive it?
Right. It notifies you that the user has seen the message.
I suppose that when a patch event is logged I can get the username or user full name by using instagram private api?
Anyway works like a charm and it's more quick to implement to get DM than the instagram-private-api
library. I'm reading the code about messages object structure, Is there a way to get messages reactions or images/vocal messages?
I can get the username or user full name by using instagram private api?
Right.
Is there a way to get messages reactions or images/vocal messages?
Should come with the message
event.
I can get the username or user full name by using instagram private api?
Right.
Is there a way to get messages reactions or images/vocal messages?
Should come with the
message
event.
I've seen that an object will be logged in case of messages that contains images or audio. I will do some research to implement these two features in my script. Thank you for the help.
I'm using this code into a cli script to listen for new messages:
I'm not suer if I'm doing it in the right way. I have two question about this library. 1) Is necessary to call the
ig.realtime.connect({ irisData: await ig.feed.directInbox().request() });
method to listen for new messages?2) Is this the right method to get new messages from DM inbox?
In my console log I've found this log about an event, but it's not a new message., why it will be logged from the
on('message')
event listener?