]> git.proxmox.com Git - proxmox.git/commitdiff
notify: add getter for notification timestamp
authorLukas Wagner <l.wagner@proxmox.com>
Tue, 23 Apr 2024 11:51:51 +0000 (13:51 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 21:06:56 +0000 (23:06 +0200)
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
proxmox-notify/src/lib.rs

index c69ac26d1d62c3154e62b6d367270e9a26e43feb..53f897a9935eea20a110cd55dfcd2b8c37a3fc11 100644 (file)
@@ -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