subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.38k stars 686 forks source link

add a "mark as read" functionnality #655

Closed Poloin34 closed 2 years ago

Poloin34 commented 2 years ago

Like we can mark a conversation as unread, it would be cool and very useful to mark one as read!

Poloin34 commented 2 years ago

Waiting for it, here is my way to do it:

r = cl.private.request(
    "OPTIONS",
    f"https://i.instagram.com/api/v1/direct_v2/threads/{thread_id}/items/{message_id}/seen/"
)

The strange thing is that it return a 405 response, but it does work

EDIT: It at least works for message, not for "action_log". a POST request instead of OPTIONS made it work

adw0rd commented 2 years ago

Why didn't you use cl.direct_send_seen? https://github.com/adw0rd/instagrapi/blob/master/instagrapi/mixins/direct.py#L357

Poloin34 commented 2 years ago

uhh, my bad, I had not seen it... Thanks

Le dim. 1 mai 2022 à 21:15, Mikhail Andreev @.***> a écrit :

Why didn't you use cl.direct_send_seen?

https://github.com/adw0rd/instagrapi/blob/master/instagrapi/mixins/direct.py#L357

— Reply to this email directly, view it on GitHub https://github.com/adw0rd/instagrapi/issues/655#issuecomment-1114313791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDEWO2LL6UTJVHAK64BV23VH3J4RANCNFSM5UYP2K5Q . You are receiving this because you authored the thread.Message ID: @.***>