pachli / pachli-android

The Pachli Android app
https://pachli.app
GNU General Public License v3.0
95 stars 13 forks source link

numbers of Follows / Following not shown accurately for friendica accounts #649

Open foss- opened 4 months ago

foss- commented 4 months ago

Describe the bug When visiting my own profile of a friendica account in pachli the follows and followers numbers deviate from the actual numbers shown in friendica webUI.

Not sure why that is - maybe the numbers are checked only after initial account setup but then not updated when following or being followed by new people.

Since my actual numbers are higher I can say this is a problem with new follows / followings. Not sure if this is also a problem when unfollowing.

To Reproduce

  1. setup friendica account in pachli
  2. look at profile page and follows / followers numbers
  3. via friendica webui follow a few other users or receive now follows
  4. check profile in pachli, pull to refresh does not change the numbers

Expected behavior Follows / Following numbers should be reflected accurately.

Versions Pachli Current 2.4.0+3e1d94de (not a new problem, obviously low prio, did not get around to report earlier) This is Friendica, version 2024.06-dev that is running at the web location https://pirati.ca. The database version is 1560/1560, the post update version is 1550/1550.

nikclayton commented 3 months ago

When you did the above, did you also check to see if the web interface was showing the correct numbers?

I just tried the same thing on pirati.ca -- I followed a few people, and if I go to their profile page there's an "Unfollow" button, so I assume the server knows I'm following them.

But if (on the web UI) I check the "Following" tab for my account (https://pirati.ca/profile/nikclayton/contacts/following) they don't show up. And if I use the API to fetch the details for my account (https://pirati.ca/api/v1/accounts/5245970) the following_count in the response is 1, when it should be higher than that.

Although... looking at the profile pages of the people I followed there's also a "Awaiting connection acknowledge" message -- I'm going to guess that means they have to approve the follow request first, so that's why it's not showing up in the numbers.

Any chance that's what happened to you?

foss- commented 3 months ago

The acknowledge follow is an account specific setting and I think what you are seeing is expected. I requested a follow from you in order to test this. It seems while the button switches to unfollow (makes sense as follow, although not yet confirmed, is the current state) the contact ever shows in following once approved.

I am pretty sure that is not what I am seeing. Somehow the actual state of contacts and the information pachli shows seems to go out of sync.

Just found a contact which is not showing in webUI either following or follows but in pachli shows as both Follows You and I can unfollow.

Another thing I noticed is that many twitter contacts are still showing as followers. I had revoked the follow via friendica webUI (Contacts > Open contact profile > Actions > Revoke follow) and they no longer show in webUI but Followers still lists all of the accounts. Maybe just another side effect of the sam problem?

For twitter contacts who I am not following and they are not showing in friendica webUI it seems the follows me information in pachli is wrong. Also I have no way of getting rid of that contact entry as there seems to be no concept of revoke follow in mastodon.

nikclayton commented 3 months ago

I think this is a Friendica issue in the API. I see you've approved the follow request, and if I open https://pirati.ca/profile/nikclayton/contacts/following it shows that I am following two people (you, and pachli@mastodon.social).

However, https://pirati.ca/api/v1/accounts/5245970 still lists a following_count of 1, not the 2 that the web UI shows.

But if I ask for the list of accounts I'm following, with https://pirati.ca/api/v1/accounts/5245970/following, the results show two followers.

I've reported this to Friendica at https://github.com/friendica/friendica/issues/14121