mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 17:14:21 +01:00
Merge a few fixes from kernel #652,#649
kernelkind (2):
log nip05 error
fix persist deck author profile bug
This commit is contained in:
@@ -6,6 +6,7 @@ use ehttp::{Request, Response};
|
|||||||
use enostr::{Keypair, Pubkey, SecretKey};
|
use enostr::{Keypair, Pubkey, SecretKey};
|
||||||
use poll_promise::Promise;
|
use poll_promise::Promise;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use tracing::error;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
pub enum AcquireKeyError {
|
pub enum AcquireKeyError {
|
||||||
@@ -104,7 +105,10 @@ fn nip05_promise_wrapper(id: &str) -> Promise<Result<Keypair, AcquireKeyError>>
|
|||||||
let result = original_promise.block_and_take();
|
let result = original_promise.block_and_take();
|
||||||
let transformed_result = match result {
|
let transformed_result = match result {
|
||||||
Ok(public_key) => Ok(Keypair::only_pubkey(public_key)),
|
Ok(public_key) => Ok(Keypair::only_pubkey(public_key)),
|
||||||
Err(e) => Err(AcquireKeyError::Nip05Failed(e.to_string())),
|
Err(e) => {
|
||||||
|
error!("Nip05 Failed: {e}");
|
||||||
|
Err(AcquireKeyError::Nip05Failed(e.to_string()))
|
||||||
|
}
|
||||||
};
|
};
|
||||||
sender.send(transformed_result);
|
sender.send(transformed_result);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ impl Keyword {
|
|||||||
("contact", Keyword::Contact, false),
|
("contact", Keyword::Contact, false),
|
||||||
("explicit", Keyword::Explicit, true),
|
("explicit", Keyword::Explicit, true),
|
||||||
("deck_author", Keyword::DeckAuthor, false),
|
("deck_author", Keyword::DeckAuthor, false),
|
||||||
("profile", Keyword::Profile, true),
|
("profile", Keyword::Profile, false),
|
||||||
("hashtag", Keyword::Hashtag, true),
|
("hashtag", Keyword::Hashtag, true),
|
||||||
("generic", Keyword::Generic, false),
|
("generic", Keyword::Generic, false),
|
||||||
("thread", Keyword::Thread, true),
|
("thread", Keyword::Thread, true),
|
||||||
|
|||||||
Reference in New Issue
Block a user