UnifiedPush / gotify-android

An app for creating push notifications for new messages posted to gotify/server.
MIT License
37 stars 2 forks source link

Doesn't send past messages to apps #1

Open karmanyaahm opened 3 years ago

karmanyaahm commented 3 years ago

If I'm offline for a few hours and receive messages on some apps, Gotify-UP reconnects and continues sending new messages, but not old one. I think it only forwards new messages from the websocket and not old ones that are loaded through the /message API?

p1gp1g commented 3 years ago

The problem comes here : https://github.com/UnifiedPush/gotify-android/blob/main/app/src/main/java/com/github/gotify/messages/provider/MessageRequester.java#L19-L31 (log: "gotify : Loading more messages for -1"; -1 is ALL_MESSAGES).

Called here : https://github.com/UnifiedPush/gotify-android/blob/main/app/src/main/java/com/github/gotify/messages/provider/MessageFacade.java#L31 https://github.com/UnifiedPush/gotify-android/blob/main/app/src/main/java/com/github/gotify/messages/MessagesActivity.java#L615