freunde.ma-nic.de

Marco R. friendica
Hi !Friendica Developers the APIs api/friends/list,api/followers/list,api/followers/ids and /api/statuses/friends, /accounts/[id]/followers, /accounts/[id]/following are still not working in Friendica 06/2022 (see https://git.friendi.ca/lubuwest/Friendiqa/issues/29). They make a request on the table 'contact-relation' with the filter follow=true. However, for all 60000 entries on my server this value is false and follow-updated is always '0001-01-01 00:00:00'. So the return is always an empty list. I also did not found a function in the code that touches these columns.
In src/Model/Contact.php they only deal with the 'contact' table and change the rel column. Wouldn't it be better to query this table instead in the APIs?
Greetings, Marco.
2 people reshared this
Michael Vogel friendica (via ActivityPub)
We are using the contact-relation since this enables us to display followers/followings of all contacts, not only your own.
Friendica Developers reshared this.
Marco R. friendica
How is this possible if no function sets the 'follow' value to true and the follow-updated? Only the cid, relation-cid and last-interaction columns have reasonable values. Is there some background process missing in my server?
Friendica Developers reshared this.
Roland Häder friendica (via ActivityPub)
@Marco R. Hmm, my contact-relation has records where follow is 1 and also follow-updated is set.
Friendica Developers reshared this.
Marco R. friendica
Oh, according to the code in SRC/Model/Contact/Relation.php this list only gets updates, if profile['hide-friends'] is empty. I guess I have set that to true, thats why all entriss have follow=false.
I didn't know that the hiding relates to the relationship-table being incomplete and the APIs (which require login) returning an empty array. I find that misleading...
Friendica Developers reshared this.
Roland Häder friendica (via ActivityPub)
@Marco R. Please do maximum run SELECT statements and no UPDATE or DELETE on Friendica's tables. You might cause bugs with it. There are sometimes tables, that don't have a foreign key set because it isn't possible (e.g. cache).
Friendica Developers reshared this.
Marco R. friendica
I think that this condition in line 180 to 183 of src/Model/Contact/Relationship.php is an error.
How long does it take for the contacts to be refetched and can I test if that condition was the error? Now the setting 'hide friends' is unchecked.
Friendica Developers reshared this.