radar2go / radar-beta

This is a public repo meant to collect issue reports on radar2go
1 stars 0 forks source link

Not displaying posts sent only to followers #37

Closed mturjak closed 8 years ago

mturjak commented 8 years ago

If you have a vendor marked as a favourite, then you are their follower. And if they post only to followers the post should should be fetched like other public and private posts, but it does not show up.

mturjak commented 8 years ago

In the API code in the PostsModel method listPosts() had a mistake ... it was filtering for string favourites where the post visibility is actually set to followers

I changed it in the if condition of the filter and now it works as expected

$post['visibility'] === 'followers' && in_array($post['authorId'], $favourites)