Skip to content

Commit

Permalink
Merge branch 'master' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedilger committed Jan 25, 2025
2 parents 0e9b49c + 1ffe783 commit 1cb4712
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
5 changes: 1 addition & 4 deletions gossip-lib/src/dm_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ impl DmChannel {
pub fn from_event(event: &Event, my_pubkey: Option<PublicKey>) -> Option<DmChannel> {
let my_pubkey = match my_pubkey {
Some(pk) => pk,
None => match GLOBALS.identity.public_key() {
Some(pk) => pk,
None => return None,
},
None => GLOBALS.identity.public_key()?,
};

if event.kind == EventKind::EncryptedDirectMessage {
Expand Down
5 changes: 1 addition & 4 deletions gossip-lib/src/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,7 @@ impl Globals {
}

pub fn get_your_nprofile() -> Option<Profile> {
let public_key = match GLOBALS.identity.public_key() {
Some(pk) => pk,
None => return None,
};
let public_key = GLOBALS.identity.public_key()?;

let mut profile = Profile {
pubkey: public_key,
Expand Down
2 changes: 1 addition & 1 deletion gossip-lib/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ pub(crate) fn process_relationships_of_event(
if t.tagname() == "l" {
if t.value() != "" {
label = t.value();
if t.get_index(2) != "" {
if !t.get_index(2).is_empty() {
namespace = t.get_index(2);
}
}
Expand Down

0 comments on commit 1cb4712

Please sign in to comment.