gotify / server

A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
https://gotify.net
Other
11.52k stars 639 forks source link

Get Messages does not honor the "since" query filter #682

Closed MillanAireson closed 2 months ago

MillanAireson commented 2 months ago

Can the issue be reproduced with the latest available release? (y/n) YES

Which one is the environment gotify server is running in?

Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy) NO

On which client do you experience problems? (Select as many as you can see)

returns:

What did you do? invoke-RestMethod -uri "http://locahost/message??limit=100&since=1725667200&token="

What did you expect to see?

@{size=6; since=1725667200; limit=100}

With ONLY the messages since that date.

What did you see instead? (Include screenshots, android logcat/request dumps if possible)

@{size=6; since=0; limit=100}

With all messages (max 100)

jmattheis commented 2 months ago

The since query parameter is a message id and not a timestamp.

image

https://gotify.net/api-docs

MillanAireson commented 2 months ago

My apologies. Thank you for clearing that up. Not sure how I missed that in the swagger docs. My mind must have just been telling me it was a datetime.....

MillanAireson commented 2 months ago

@jmattheis shouldn't the since query return all messages with an ID greater than the specified ID?

In my mind when you say, "since" you are referring to everything that has happened after.

jmattheis commented 2 months ago

See https://github.com/gotify/server/issues/34#issuecomment-644077391