From 8f408ea4aff85b574246c7b9546e988f01e25d3e Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Tue, 23 Apr 2024 13:51:51 +0200 Subject: [PATCH] notify: add getter for notification timestamp Signed-off-by: Lukas Wagner Tested-by: Maximiliano Sandoval --- proxmox-notify/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index c69ac26d..53f897a9 100644 --- a/proxmox-notify/src/lib.rs +++ b/proxmox-notify/src/lib.rs @@ -261,6 +261,11 @@ impl Notification { pub fn id(&self) -> &Uuid { &self.id } + + /// Return the notification's timestamp + pub fn timestamp(&self) -> i64 { + self.metadata.timestamp + } } /// Notification configuration