Nerixyz / instagram_mqtt

Realtime and Push Notification (FBNS) support for the instagram-private-api
MIT License
244 stars 49 forks source link

Can a mqtt client handle a change in message status (direct) ? #45

Closed Eonus21 closed 2 years ago

Eonus21 commented 4 years ago

I need to handle when someone read my direct messages, can I make this with mqtt?

Nerixyz commented 4 years ago

This is possible.

Eonus21 commented 4 years ago

Can you give some code example or some advice, where can I see this example pls.

Eonus21 commented 4 years ago

And yet - I would like to process real-time likes,comments and events when a person writes from another device. It is possible? Then we can discuss about it in another issue

Nerixyz commented 4 years ago

On the message event, you'll get an event like this:

{
  "event": "patch",
  "message_type": 1,
  "seq_id": 1234,
  "mutation_token": null,
  "realtime": true,
  "message": {
    "path": "/direct_v2/threads/{thread_id}/participants/{user_id}/has_seen",
    "op": "replace",
    "thread_id": "...",
    "timestamp": 1234567,
    "item_id": "..."
  }
}

It's basically this example.

real-time likes

I don't think that's possible.

comments

You may want to use fbns for this although this isn't reliable.

events when a person writes from another device

You can't get information about the device.