Open autogestion opened 4 years ago
Instead of sending follow request which could fail, there could be check before showing follow
or unfollow
button. One way is to fetch home user following
list and try to match searched user. second way it to fetch followers
list of searched user and try to match home user.
First way could be processed faster on backend (by direct query to db), and backend could add some mark to response. Still, backend solution goes outside activitypub spec
So the fastest, and closest to spec way, as for me, is to just to try to follow. But user could be confused that he already follow this remote user, and after refresh Philip shows him that remote user as still unfollowed.
@traumschule Any thoughts on this? Which way looks better
imo the backend should send the info if followed together with the search result
If trying to follow already followed user on search/follow page (SearchFollow.svelte component), server return 409 conflict with response data
{'error': 'This user is already followed'}
. Display this error to user