-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/release-7.0.0' into migration-to…
…-remove-redundant-indexes
- Loading branch information
Showing
6 changed files
with
40 additions
and
15 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": major | ||
--- | ||
|
||
Changes End-to-end encryption default setting to enable mention in encrypted messages |
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
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 |
---|---|---|
|
@@ -44,5 +44,6 @@ import './v308'; | |
import './v309'; | ||
import './v310'; | ||
import './v311'; | ||
import './v312'; | ||
|
||
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 |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import { LivechatRooms, Rooms, Subscriptions, Users } from '@rocket.chat/models'; | ||
import { Settings } from '@rocket.chat/models'; | ||
|
||
import { addMigration } from '../../lib/migrations'; | ||
|
||
addMigration({ | ||
version: 311, | ||
name: 'Update default behavior of E2E_Enabled_Mentions setting, to allow mentions in encrypted messages by default.', | ||
async up() { | ||
try { | ||
await Promise.allSettled([ | ||
LivechatRooms.col.dropIndex('v.token_1'), | ||
Rooms.col.dropIndex('t_1'), | ||
Subscriptions.col.dropIndex('rid_1'), | ||
Users.col.dropIndex('active_1'), | ||
]); | ||
} catch (error: unknown) { | ||
console.warn('Error dropping redundant indexes, continuing...'); | ||
console.warn(error); | ||
} | ||
await Settings.updateOne( | ||
{ | ||
_id: 'E2E_Enabled_Mentions', | ||
}, | ||
{ | ||
$set: { | ||
value: true, | ||
packageValue: true, | ||
}, | ||
}, | ||
); | ||
}, | ||
}); |
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,20 @@ | ||
import { LivechatRooms, Rooms, Subscriptions, Users } from '@rocket.chat/models'; | ||
|
||
import { addMigration } from '../../lib/migrations'; | ||
|
||
addMigration({ | ||
version: 312, | ||
async up() { | ||
try { | ||
await Promise.allSettled([ | ||
LivechatRooms.col.dropIndex('v.token_1'), | ||
Rooms.col.dropIndex('t_1'), | ||
Subscriptions.col.dropIndex('rid_1'), | ||
Users.col.dropIndex('active_1'), | ||
]); | ||
} catch (error: unknown) { | ||
console.warn('Error dropping redundant indexes, continuing...'); | ||
console.warn(error); | ||
} | ||
}, | ||
}); |
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