-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: Fix Omnichannel not working after meteor update #26194
Regression: Fix Omnichannel not working after meteor update #26194
Conversation
@@ -37,7 +38,7 @@ export class LivechatRooms extends Base { | |||
|
|||
findLivechat(filter = {}, offset = 0, limit = 20) { | |||
const query = Object.assign(filter, { t: 'l' }); | |||
return this.find(query, { sort: { ts: -1 }, offset, limit }); | |||
return this.findPaginated(query, { sort: { ts: -1 }, offset, limit }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a findPaginated
in Base
class.. I actually moved all queries that needed to use findPaginated
to raw model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, this worked 🤔 let me change
|
||
import { Base } from './_Base'; | ||
import Rooms from './Rooms'; | ||
import Settings from './Settings'; | ||
// import Settings from './Settings'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// import Settings from './Settings'; |
@@ -188,7 +184,7 @@ export class LivechatDepartmentAgents extends Base { | |||
}, | |||
}; | |||
|
|||
const bot = this.findAndModify(query, sort, update); | |||
const bot = this.findOneAndUpdate(query, update, { sort, returnNewDocument: 'after' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should use rawCollection()
or this method/operation should be moved to a raw model
|
||
return livechatCount.value.value; | ||
const livechatCount = await Settings.findOneAndUpdate(query, update, { returnDocument: 'after' }); | ||
return livechatCount.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the correct return value here should be the same as before.. but since the return is not used right now, it doesn't break anything 😬
return livechatCount.value; | |
return livechatCount.value.value; |
…jumpMessage * 'develop' of github.com:RocketChat/Rocket.Chat: (27 commits) Chore: Remove unused migrations (#26102) Regression: Fix files list endpoints (#26226) Regression: Fix Omnichannel not working after meteor update (#26194) Regression: Empty URL previews in messages. (#26160) Regression: OTR with new React Messages (#26179) Regression: Replace contact center icon (#26216) Regression: Fix rendered markdown styling on app info page details section (#26093) [BREAK] Remove webRTC for channels/dm/groups (#26225) Regression: Meteor uses projection for its observes (#26223) Chore: Do not log integrations using `name` key (#26163) Chore: Check for env var values and not just if they are set (#26219) Regression: UIKit buttons auth user validation (#26171) Regression: Cannot logout when CallProvider is unregistered and mounted (#26158) Regression: Change Audio settings for device settings as modal title (#26159) Regression: Inline code and copyonly tag styles (#26173) Regression: remove italic from reaction translation (#26152) Regression: Reverting @rocket.chat/mp3-encoder version to fix Audio Message (#26197) Chore: Info page (#26201) Regression: Fix command previews (#26199) Change Apps-Engine version source for info (#26205) ...
Proposed changes (including videos or screenshots)
Fixed things:
Other fixed things:
Issue(s)
Steps to test or reproduce
Further comments