api: dc_accounts_set_push_device_token and dc_get_push_state APIs

This commit is contained in:
link2xt
2024-02-23 10:01:33 +00:00
parent 863a386d0f
commit 7502234686
11 changed files with 308 additions and 14 deletions

View File

@@ -90,6 +90,10 @@ impl Session {
self.capabilities.can_metadata
}
pub fn can_push(&self) -> bool {
self.capabilities.can_push
}
/// Returns the names of all folders on the IMAP server.
pub async fn list_folders(&mut self) -> Result<Vec<async_imap::types::Name>> {
let list = self.list(Some(""), Some("*")).await?.try_collect().await?;