Skip to content

Revert "Merge branch 'setop-master-patch-94239' into 'master'"

setop requested to merge setop/mobilizon:revert-baf91992 into master

This reverts merge request !784 (merged)

Unfortunately the "distinct" clause was not there by mistake, but on purpose. It was there to compensate a join on followers table.

The consequence is, without the distinct clause, there are duplicates of local events in the search results (as much as followers).

This join on followers is used to remove from search results the events shared by instances your are not following anymore but are still your DB.

In any case, the "distinct" clause should be in the same function as the "join" clause and not far from it in a very different function.

As a workaround I choose to remove the distinct to keep ordering and to remove join to prevent duplicates.

The original intent can probably be expressed in Ecto but I'm not willing to spend so much effort on it.

Edited by setop

Merge request reports