-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[IMPROVE] Replace livechat:externalMessages publication by REST #15643
[IMPROVE] Replace livechat:externalMessages publication by REST #15643
Conversation
this.roomId = Template.currentData().rid; | ||
this.subscribe('livechat:externalMessages', Template.currentData().rid); | ||
if (this.roomId) { | ||
const { messages } = await APIClient.v1.get(`livechat/messages.external?roomId=${ this.roomId }`); |
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.
We need to use pagination here, otherwise, only the first fetch will be displayed.
|
||
export class LivechatExternalMessage extends Base { | ||
constructor() { | ||
super('livechat_external_message'); |
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.
What about creating an index for the rid
field?
It would provide more performance when finding records.
* Regression messageAttachments * [IMPROVE] Replace livechat:externalMessages publication by REST (#15643) * Replace livechat:externalMessages publication by REST * Fix lint * Add pagination to livechat external messages * Add index and remove obsolete collection * remove pages to dynamic
No description provided.