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

[BUG] direct_message_delete returning success without deleting the message specified. #890

Closed SkepticOwl closed 1 year ago

SkepticOwl commented 2 years ago

I log in to an Instagram account using the login_by_session_id method(with a saved session). When I try to make a direct_message_delete request with a valid thread and message id(I'm the sender of the message) the function returns success(response["status"] is True) and doesn't error my code, however, the message doesn't actually get deleted on the website(direct_messages function returns it after deletion as well in my messages loop causing my script to run for an infinite amount of time).

Desktop

Additional context When I first started using the API the messages were actually being deleted, however, the problem started occurring after I switched to using saved sessions and logging in to an account using login_by_session_id, before I switched to using this method(for efficiency reasons) I left my project aside for around 3 days, so the bug may have appeared during this time period and have nothing to do with the above claim.

nicoszpako commented 2 years ago

Same bug for me.

hdem607 commented 1 year ago

Same happening here. After checking Proxyman response to the request, it is getting

{
  "status": "ok",
  "status_code": "200"
}

Weird situation

nebula0225 commented 1 year ago

Still same for me. it doesn't work

thread = cl.direct_threads(1)[0]
message = cl.direct_messages(thread.id, 1)[0]
print(message)
result = cl.direct_message_delete(message.thread_id, message.id)
cskartikey commented 1 year ago

@adw0rd Could you look into this?

adw0rd commented 1 year ago

@cskartikey send me a PR, I will definitely check it and accept it

cskartikey commented 1 year ago

@adw0rd Sorry for the delay. Have a look though.

adw0rd commented 1 year ago

@cskartikey thanks! Have you checked it?

cskartikey commented 1 year ago

@adw0rd Yep, you may close the issue.