GetStream / stream-chat-js

JS / Browser Client - Build Chat with GetStream.io
https://getstream.io/chat/
Other
178 stars 77 forks source link

fix: initial load threads edge case #1361

Closed isekovanic closed 6 days ago

isekovanic commented 6 days ago

CLA

Description of the changes, What, Why and How?

There is currently a weird behaviour on the thread query-ing endpoint in the backend where if you call it with { limit: 0} it skips the pagination entirely and returns all of the threads. While things aren't initialized yet, it is entirely possible that both threads.length and unseenThreadIds.length are 0, hence the issue occurring (typically on the first ever load of the thread list).

This PR takes care that this doesn't happen and the limit is never 0.

Changelog

-

github-actions[bot] commented 6 days ago

Size Change: +17 B (0%)

Total Size: 427 kB

Filename Size Change
dist/browser.es.js 92.5 kB +4 B (0%)
dist/browser.full-bundle.min.js 54.1 kB +2 B (0%)
dist/browser.js 93.6 kB +4 B (0%)
dist/index.es.js 92.6 kB +4 B (0%)
dist/index.js 93.7 kB +3 B (0%)

compressed-size-action