Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ranfdev committed Nov 16, 2023
1 parent 725d5a3 commit 52dec9e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notify"
version = "0.1.1"
version = "0.1.3"
authors = ["ranfdev <[email protected]>"]
edition = "2021"

Expand Down
6 changes: 6 additions & 0 deletions data/resources/com.ranfdev.Notify.metainfo.xml.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

<content_rating type="oars-1.0" />
<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">
<ul>
<li>Introduced dialog to write advanced messages</li>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'notify',
'rust',
version: '0.1.2',
version: '0.1.3',
meson_version: '>= 0.59',
# license: 'MIT',
)
Expand Down
7 changes: 7 additions & 0 deletions ntfy-daemon/src/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ impl Credentials {
self.creds.borrow().clone()
}
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([
("type", "password"),
("username", username),
Expand Down

0 comments on commit 52dec9e

Please sign in to comment.