-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Missing retention's
ignoreThreads
param for old channels (#33028)
- Loading branch information
1 parent
28ee8a0
commit 1b0b5ba
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Fixes an issue where ignore threads parameter were not being affected by retention policy overriding in old channels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,6 @@ import './v301'; | |
import './v303'; | ||
import './v304'; | ||
import './v305'; | ||
import './v306'; | ||
|
||
export * from './xrun'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Rooms } from '@rocket.chat/models'; | ||
|
||
import { addMigration } from '../../lib/migrations'; | ||
|
||
addMigration({ | ||
version: 306, | ||
name: 'Adds missing ignoreThreads parameter for old rooms with retention policy overridden', | ||
async up() { | ||
await Rooms.updateMany( | ||
{ | ||
'retention.enabled': true, | ||
'retention.overrideGlobal': true, | ||
'retention.ignoreThreads': { $exists: false }, | ||
}, | ||
{ | ||
$set: { | ||
'retention.ignoreThreads': false, | ||
}, | ||
}, | ||
); | ||
}, | ||
}); |