-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into regr…
…ession/fuselage * 'develop' of github.com:RocketChat/Rocket.Chat: Regression: fix fuselage import, remove directory css (#17116) [IMPROVE] Apps Engine: Reduce some stream calls and remove a find user from the app's status changes (#17115) Regression: Remove old and closed Omnichannel inquiries (#17113) [FIX] Member's list only filtering users already on screen (#17110)
- Loading branch information
Showing
5 changed files
with
58 additions
and
34 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
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
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 |
---|---|---|
|
@@ -177,4 +177,5 @@ import './v176'; | |
import './v177'; | ||
import './v178'; | ||
import './v179'; | ||
import './v180'; | ||
import './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,20 @@ | ||
import { Migrations } from '../../../app/migrations/server'; | ||
import { LivechatRooms, LivechatInquiry } from '../../../app/models/server'; | ||
|
||
Migrations.add({ | ||
version: 180, | ||
up() { | ||
// Remove Old Omnichannel Inquiries related to rooms already closed | ||
LivechatInquiry.find().forEach((inquiry) => { | ||
const { rid, status } = inquiry; | ||
if (status === 'closed') { | ||
return LivechatInquiry.removeByRoomId(rid); | ||
} | ||
|
||
const room = LivechatRooms.findOneById(rid, { closedAt: 1 }); | ||
if (!room || room.closedAt) { | ||
LivechatInquiry.removeByRoomId(rid); | ||
} | ||
}); | ||
}, | ||
}); |