Skip to content

Commit

Permalink
Build: 84bff7d
Browse files Browse the repository at this point in the history
  • Loading branch information
pkreissel authored and github-actions[bot] committed Sep 26, 2023
1 parent 9255847 commit d50cdc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/feeds/homeFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Storage_1 = __importDefault(require("../Storage"));
async function getHomeFeed(api, user) {
let results = [];
let pages = 10;
const lastOpened = new Date(await Storage_1.default.getLastOpened()) ?? new Date(0);
const lastOpened = new Date(await Storage_1.default.getLastOpened() - 600) ?? new Date(0);
const defaultCutoff = new Date(Date.now() - 43200000);
const dateCutoff = lastOpened < defaultCutoff ? defaultCutoff : lastOpened;
console.log("Date Cutoff: ", dateCutoff);
Expand Down
4 changes: 3 additions & 1 deletion dist/feeds/topPostsFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const FeatureStore_1 = __importDefault(require("../features/FeatureStore"));
const change_case_1 = require("change-case");
const Storage_1 = __importDefault(require("../Storage"));
async function getTopPostFeed(api) {
const core_servers = await FeatureStore_1.default.getCoreServer(api);
let results = [];
Expand Down Expand Up @@ -54,6 +55,7 @@ async function getTopPostFeed(api) {
}).slice(0, 10);
}));
console.log(results);
return results.flat();
const lastOpened = new Date(await Storage_1.default.getLastOpened() - 28800000) ?? new Date(0);
return results.flat().filter((status) => new Date(status.createdAt) > lastOpened);
}
exports.default = getTopPostFeed;

0 comments on commit d50cdc9

Please sign in to comment.