Updates query for threads
Previous query incorrectly pulled and sorted posts, often showing years old posts from newly followed people. This now behaves more consistently as "recent threads from people in your extended network".
This commit is contained in:
parent
573d7096f3
commit
0e698df8f3
|
@ -936,12 +936,22 @@ module.exports = ({ cooler, isPublic }) => {
|
|||
|
||||
const myFeedId = ssb.id;
|
||||
|
||||
const options = configure({
|
||||
type: "post",
|
||||
private: false,
|
||||
});
|
||||
|
||||
const source = ssb.messagesByType(options);
|
||||
const source = ssb.query.read(
|
||||
configure({
|
||||
query: [
|
||||
{
|
||||
$filter: {
|
||||
value: {
|
||||
timestamp: { $lte: Date.now() },
|
||||
content: {
|
||||
type: "post",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
|
||||
const messages = await new Promise((resolve, reject) => {
|
||||
pull(
|
||||
|
|
Loading…
Reference in New Issue