Pinning topics not at top of latest response


(Erica) #1

We are trying to have a globally pinned topic show up on top of our newsfeed powered by the latest.json endpoint. Our app is a custom GUI overtop discourse. If I globally pin a topic - shouldn’t it show up at the top of the latest.json API endpoint?
If it doesn’t, why not?

Is there an API for banners?
We are trying to have pinned or banners at the top of our newsfeed view - how should we go about doing this using the features of discourse.

Thanks,
_Erica


(Sam Saffron) #2

Yes, it will show up on top, what could have happened is that you unpinned it or the user making the request unpinned it.

Yes see:


(Erica) #3

For anybody running into similar issues: we figured out why pinned posts weren’t showing up for us.
We use the latest endpoint with a sort on order=created, which causes pinned posts to not be on top.

If the default sort is used, pinned posts will show up on top. Note that the default settings in discourse around pinned posts were such that once latest was requested by a single user - that pinned post was considered seen by that user - so that the next request of the same url would no longer have the pinned post.

Thank for your help, everybody!