Code Monkey home page Code Monkey logo

Comments (4)

nuno-vieira avatar nuno-vieira commented on September 17, 2024 1

Hi @mschuetz-viz, yes correct, the page size limit is 300. So you should use a value lower than that. It is mentioned in the docs for other endpoints, but not for messages actually. We will make sure to update this 👍

Best,
Nuno

from stream-chat-swift.

nuno-vieira avatar nuno-vieira commented on September 17, 2024 1

Actually it is kinda hidden here: https://getstream.io/chat/docs/javascript/channel_pagination/

from stream-chat-swift.

mschuetz-viz avatar mschuetz-viz commented on September 17, 2024 1

Nice, thanks @nuno-vieira for pointing this out. Wouldn't it make sense that hasLoadedAllPreviousMessages would return false in that case? Anyway, nothing that's blocking us 🚀

from stream-chat-swift.

nuno-vieira avatar nuno-vieira commented on September 17, 2024 1

@mschuetz-viz, no because the way hasLoadedAllPreviousMessages is calculated is with messages.count < pageSize, that is why it returns true. The message count will be 300 and the pageSize will be 1000. This calculation avoids additional HTTP requests just to check if there are no more messages. 👍 (ofc assuming the page size is below the limit)

from stream-chat-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.