mahrtayyab / tweety

Twitter Scraper
480 stars 64 forks source link

sender attribute of Message object no longer being set #185

Closed ayancey closed 5 months ago

ayancey commented 5 months ago

This issue seems to have happened between version 3.2 and now.

https://github.com/mahrtayyab/tweety/blob/7a7eedd6faf361d990be6b37aec3f4249fbc10ea/src/tweety/types/inbox.py#L519-L530

The get_recipient method returns None when trying to set it. self._inbox dict does not have any users key in it, so it fails.

mahrtayyab commented 5 months ago

Yes , it is known and for that purpose sender_id is there, you can use that id to get user.

mahrtayyab commented 5 months ago

If the inbox response is too large , Twitter don't send the users at all , then uses sender_id to get the users.

ayancey commented 5 months ago

If the inbox response is too large , Twitter don't send the users at all , then uses sender_id to get the users.

Would this incur an additional API call to change the sender_id into the actual user ID?

mahrtayyab commented 5 months ago

If the inbox response is too large , Twitter don't send the users at all , then uses sender_id to get the users.

Would this incur an additional API call to change the sender_id into the actual user ID?

sender_id is the actual user ID of the the sender , if you mean full user object , Yes it will incur the API Call, but you can send multiple user ids at once as list to get_user_info , it will use only one call to get all users in List.