v0.1.3
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1800,7 +1800,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notify"
|
name = "notify"
|
||||||
version = "0.1.1"
|
version = "0.1.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"ashpd",
|
"ashpd",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "notify"
|
name = "notify"
|
||||||
version = "0.1.1"
|
version = "0.1.3"
|
||||||
authors = ["ranfdev <ranfdev@gmail.com>"]
|
authors = ["ranfdev <ranfdev@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,12 @@
|
|||||||
|
|
||||||
<content_rating type="oars-1.0" />
|
<content_rating type="oars-1.0" />
|
||||||
<releases>
|
<releases>
|
||||||
|
<release version="0.1.3" date="2023-11-16">
|
||||||
|
<ul>
|
||||||
|
<li>Support for basic authentication with custom accounts</li>
|
||||||
|
<li>Custom server field is now prefilled when appropriate</li>
|
||||||
|
</ul>
|
||||||
|
</release>
|
||||||
<release version="0.1.2" date="2023-11-07">
|
<release version="0.1.2" date="2023-11-07">
|
||||||
<ul>
|
<ul>
|
||||||
<li>Introduced dialog to write advanced messages</li>
|
<li>Introduced dialog to write advanced messages</li>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
project(
|
project(
|
||||||
'notify',
|
'notify',
|
||||||
'rust',
|
'rust',
|
||||||
version: '0.1.2',
|
version: '0.1.3',
|
||||||
meson_version: '>= 0.59',
|
meson_version: '>= 0.59',
|
||||||
# license: 'MIT',
|
# license: 'MIT',
|
||||||
)
|
)
|
||||||
|
|||||||
@ -58,6 +58,13 @@ impl Credentials {
|
|||||||
self.creds.borrow().clone()
|
self.creds.borrow().clone()
|
||||||
}
|
}
|
||||||
pub async fn insert(&self, server: &str, username: &str, password: &str) -> anyhow::Result<()> {
|
pub async fn insert(&self, server: &str, username: &str, password: &str) -> anyhow::Result<()> {
|
||||||
|
{
|
||||||
|
if let Some(cred) = self.creds.borrow().get(server) {
|
||||||
|
if cred.username != username {
|
||||||
|
anyhow::bail!("You can add only one account per server");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
let attrs = HashMap::from([
|
let attrs = HashMap::from([
|
||||||
("type", "password"),
|
("type", "password"),
|
||||||
("username", username),
|
("username", username),
|
||||||
|
|||||||
Reference in New Issue
Block a user