From e71891343c4f2b0a2664583167eb30253e95fc15 Mon Sep 17 00:00:00 2001 From: candifloss Date: Thu, 17 Oct 2024 15:02:17 +0530 Subject: [PATCH] remove actions --- src/formats/serde.rs | 8 +++++--- src/main.rs | 2 +- src/notification.rs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/formats/serde.rs b/src/formats/serde.rs index 72f164f..6023240 100644 --- a/src/formats/serde.rs +++ b/src/formats/serde.rs @@ -20,8 +20,10 @@ where map.serialize(serializer) } -pub fn serialize_hints(hints: &HashMap, serializer: Serializer) -> Result -{ +pub fn serialize_hints( + hints: &HashMap, + serializer: Serializer, +) -> Result { let mut hint_map = serde_json::Map::new(); for hint in hints { @@ -30,7 +32,7 @@ pub fn serialize_hints(hints: &HashMap, serializer: Seria let sig = hint_val.value_signature(); let val = hint_val.try_clone(); h.insert(sig.to_string(), serde_json::Value::String(val)); - + hint_map.insert(hint_name.clone(), serde_json::Value::Object(h.clone())); } } diff --git a/src/main.rs b/src/main.rs index edcf5a3..92942dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -109,7 +109,7 @@ async fn main() -> Result<()> { } "GetCapabilities" => { // Client requested server capabilities. Respond with the supported capabilities - let capabilities = vec!["actions", "body", "body-hyperlinks"]; // Add more LATER + let capabilities = vec![/*"actions",*/ "body", "body-hyperlinks"]; // Add more LATER connection.reply(&msg, &capabilities).await?; if verbose { println!("Request received: {member}\n\tCapabilities: {capabilities:?}"); diff --git a/src/notification.rs b/src/notification.rs index 2b73ef2..597201e 100644 --- a/src/notification.rs +++ b/src/notification.rs @@ -1,4 +1,4 @@ -use crate::formats::serde::{serialize_actions,serialize_hints}; +use crate::formats::serde::{serialize_actions, serialize_hints}; use serde::Serialize; use std::collections::HashMap; use zbus::{message::Body, Result};