Skip to content

Commit

Permalink
[TMP FOR STAGING] AR-3427 Limit even more, to just 3 weeks
Browse files Browse the repository at this point in the history
  • Loading branch information
nmagedman committed Sep 22, 2024
1 parent 22f5b18 commit c569ab0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/meteor/server/models/raw/Messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -866,13 +866,13 @@ export class MessagesRaw extends BaseRaw<IMessage> implements IMessagesModel {
findForUpdates(roomId: string, timestamp: Date, options?: FindOptions<IMessage>): FindCursor<IMessage> {
// HACK: To support bulk username renames without causing massive load (due to fetching every ancient post),
// only fetch recently created messages.
const duration_3_months_in_ms = 3 * 30 * 24 * 60 * 60 * 1000
const date_3_months_ago = new Date(Date.now() - duration_3_months_in_ms)
const duration_3_weeks_in_ms = 3 * 7 * 24 * 60 * 60 * 1000

Check failure on line 869 in apps/meteor/server/models/raw/Messages.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Variable name `duration_3_weeks_in_ms` must match one of the following formats: camelCase, UPPER_CASE, PascalCase

Check failure on line 869 in apps/meteor/server/models/raw/Messages.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Insert `;`
const date_3_weeks_ago = new Date(Date.now() - duration_3_weeks_in_ms)

Check failure on line 870 in apps/meteor/server/models/raw/Messages.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Variable name `date_3_weeks_ago` must match one of the following formats: camelCase, UPPER_CASE, PascalCase

Check failure on line 870 in apps/meteor/server/models/raw/Messages.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Insert `;`

const query = {
rid: roomId,
ts: {
$gte: date_3_months_ago,
$gte: date_3_weeks_ago,
},
_updatedAt: {
$gt: timestamp,
Expand Down

0 comments on commit c569ab0

Please sign in to comment.