oe4dns / tootgroup.py

Emulate group accounts on Mastodon and Pleroma
GNU General Public License v3.0
16 stars 7 forks source link

[Pleroma] Not all groups members are returning from masto.account_following function call #7

Closed zen-tools closed 3 years ago

zen-tools commented 3 years ago

Hello! I have made a fork of this repository and after some time of using it I have noticed that bot didn't boost my post. After investigation, I have found that the next function call returns only 20 group members from total 22:

masto.account_following(my_account["id"])

My bot account is on Pleroma, so I am not sure if there will be the same behavior in the case of Mastodon. But, to fix this issue I have made the next code change:

masto.account_following(my_account["id"], limit=sys.maxsize)

I hope this information will be useful

oe4dns commented 3 years ago

Thank you for the info. I have tested tootgroup.py with Pleroma, but not as much as with Mastodon.

I will look into this as soon as possible - which means later this week. The info is indeed useful!

oe4dns commented 3 years ago

This does not seem to be an issue on Mastodon.

The predefined value ov masto.account_following is "limit=None" which should just return all followers. It looks like there are some compatibility issues betwenn Mastodon.py and Pleroma - on which side of the API, I cannot say. But anyway, setting the value to sys.maxsize seem reasonable enough it if helps. I am still investigating that with Pleroma but this will probably remain the solution.

oe4dns commented 3 years ago

Have been able to reproduce this on a Pleroma test account. Using limit=sys.maxsize now - Issue fixed.