Comments (6)
since=id
is probably better as two messages might have the same date, see https://coderwall.com/p/lkcaag/pagination-you-re-probably-doing-it-wrong
from server.
@lslah Using ids for pagination seems to be better. Good point!
from server.
The name of the parameter seems weird to me : message ids get incremented, so the message received by the server "since" a given id are those with higher numbers.
Keeping the current behavior, the parameter should be renamed "until" or "before". Better though would be to keep "since" but actually return new messages. Seems to be a more frequent use case no ?
from server.
@naimo Naming is hard (:.
I think, I called it this way because the messages are sorted in descending order. Thus, since
kinda makes sense. The behavior is also documented
Ascending:
Message 1 |- until 3
Message 2 |
Message 3
Message 4 |
Message 5 |- since 3
Descending:
Message 5 |- until 3
Message 4 |
Message 3
Message 2 |
Message 1 |- since 3
I don't think this renaming would justify a breaking API change.
Better though would be to keep "since" but actually return new messages. Seems to be a more frequent use case no ?
It is actually not because new messages will be transmitted via web socket. Still, the API addition would have some use cases.
from server.
from server.
@naimo Yeah, our android app does something similar. I've created #329 to add this functionality.
from server.
Related Issues (20)
- Anybody had any luck with cloudflared? HOT 2
- [PEBCAK] is there a way to capture 403 errors in the logs? HOT 2
- Windows Application for Gotify HOT 1
- yarn编译报错 HOT 10
- can git submodule add web source build files HOT 1
- Push notifications for specific user / group of users HOT 2
- Is there any way to automatically enable plugins after container restart? HOT 2
- Windows server command line options HOT 1
- Running multiple plugin instances HOT 5
- How to Revert Network Changes? HOT 1
- just provide the comprehensive docs about stream via websocket HOT 1
- [FEATURE REQUEST] Multiuser support on WebSocket HOT 5
- [Feature Request] Ability to hide login-screen elements HOT 2
- When the amount of data is too large, the service will crash directly. My current sqlite file is 2G. HOT 6
- Consider release source with ui already build? HOT 3
- Wrong token copied after application rename HOT 2
- I cannot send messages by using POSTs HOT 1
- [Request] Clear Messages After 30 Days HOT 1
- Update Message HOT 2
- Cant use emoji with sqlite3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.