zurichat / zc_messaging

19 stars 88 forks source link

Fix:FE adds query parameters to fetch room messages #160

Closed afolasope closed 1 year ago

afolasope commented 1 year ago

Linear Ticket

My PR Fixes Linear Ticket

Requested Changes

There are currently scroll issues on ZuriChat with the main chat area. It needs to be fixed to behave like Slack (not scrolling everytime you go in). Also, progressive requesting of data and old chats should be done, so it does not load all of history.

My fix

On the backend, pagination was implemented to fetch messages in batches, with a default size of 50 messages per page. On the frontend, I added the following query parameters: page and size. Page with a default value of 1 and size with a default value of 50.

@zxenonx

mikengr commented 1 year ago

@JulianaSau @ickynavigator please help review this