[GH-ISSUE #925] Any possibility of reading a topic via ntfy cli from the past? #650

Closed
opened 2026-05-07 00:26:17 +02:00 by BreizhHardware · 4 comments

Originally created by @K0-RR on GitHub (Oct 20, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/925

Both Android and web app allow for reading notifications sent BEFORE subscribing to the topic. This doesn't seem to be the case for the Linux app.

Originally created by @K0-RR on GitHub (Oct 20, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/925 Both Android and web app allow for reading notifications sent BEFORE subscribing to the topic. This doesn't seem to be the case for the Linux app.
BreizhHardware 2026-05-07 00:26:17 +02:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@wunter8 commented on GitHub (Oct 20, 2023):

Are you talking about the ntfy sub CLI tool? If so, use the since flag. For example, you can do ntfy sub --since all topic to get the messages in the cache for that topic. The shorthand ntfy sub -s all topic also works. See ntfy sub help for more info

<!-- gh-comment-id:1773031598 --> @wunter8 commented on GitHub (Oct 20, 2023): Are you talking about the `ntfy sub` CLI tool? If so, use the `since` flag. For example, you can do `ntfy sub --since all topic` to get the messages in the cache for that topic. The shorthand `ntfy sub -s all topic` also works. See `ntfy sub help` for more info
Author
Owner

@K0-RR commented on GitHub (Oct 20, 2023):

Yes, -s all did the trick, thanks. The next problem appears - is there any way to convert the unix timestamp into a human-readable time format without using external tools?
I suggest making it print both unix and regular time.

<!-- gh-comment-id:1773144889 --> @K0-RR commented on GitHub (Oct 20, 2023): Yes, -s all did the trick, thanks. The next problem appears - is there any way to convert the unix timestamp into a human-readable time format without using external tools? I suggest making it print both unix and regular time.
Author
Owner

@wunter8 commented on GitHub (Oct 20, 2023):

Not right now, no. You could use jq to parse the JSON and change the value, but I recognize that's an external tool

<!-- gh-comment-id:1773155932 --> @wunter8 commented on GitHub (Oct 20, 2023): Not right now, no. You could use `jq` to parse the JSON and change the value, but I recognize that's an external tool
Author
Owner

@K0-RR commented on GitHub (Oct 20, 2023):

Ok, at least jq seems to be installed by default on my OS.
For anyone wondering, the command I used is ntfy sub -s all topic_name | jq '.time |= strflocaltime("%Y-%m-%d %H:%M:%S")'

<!-- gh-comment-id:1773177087 --> @K0-RR commented on GitHub (Oct 20, 2023): Ok, at least jq seems to be installed by default on my OS. For anyone wondering, the command I used is `ntfy sub -s all topic_name | jq '.time |= strflocaltime("%Y-%m-%d %H:%M:%S")' `
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#650
No description provided.