Skip to content
Snippets Groups Projects
Commit 3792bdb2 authored by Douglas Fabris's avatar Douglas Fabris Committed by Guilherme Gazzo
Browse files

fix: Missing retention's `ignoreThreads` param for old channels (#33028)

parent 73d2abb0
No related branches found
No related tags found
No related merge requests found
---
'@rocket.chat/meteor': patch
---
Fixes an issue where ignore threads parameter were not being affected by retention policy overriding in old channels
...@@ -38,5 +38,6 @@ import './v301'; ...@@ -38,5 +38,6 @@ import './v301';
import './v303'; import './v303';
import './v304'; import './v304';
import './v305'; import './v305';
import './v306';
export * from './xrun'; export * from './xrun';
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,
},
},
);
},
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment