mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
When sending DM17 giftwraps, don't error out because we can't unwrap the one for the counterparty
This commit is contained in:
parent
8f17ba076e
commit
04214b4803
@ -1798,8 +1798,8 @@ impl Overlord {
|
||||
|
||||
// Post them
|
||||
for (event, relay_urls) in prepared_events.drain(..) {
|
||||
// Process this event locally
|
||||
crate::process::process_new_event(&event, None, None, false, false).await?;
|
||||
// Process this event locally (ignore any error)
|
||||
let _ = crate::process::process_new_event(&event, None, None, false, false).await;
|
||||
|
||||
// Engage minions to post
|
||||
for url in relay_urls {
|
||||
|
@ -199,10 +199,14 @@ pub async fn process_new_event(
|
||||
let mut event: &Event = event; // take ownership of this reference
|
||||
let mut rumor_event: Event;
|
||||
if event.kind == EventKind::GiftWrap {
|
||||
let rumor = GLOBALS.identity.unwrap_giftwrap(event)?;
|
||||
rumor_event = rumor.into_event_with_bad_signature();
|
||||
rumor_event.id = event.id; // Lie so it's handled with the giftwrap's id
|
||||
event = &rumor_event;
|
||||
if let Ok(rumor) = GLOBALS.identity.unwrap_giftwrap(event) {
|
||||
rumor_event = rumor.into_event_with_bad_signature();
|
||||
rumor_event.id = event.id; // Lie so it's handled with the giftwrap's id
|
||||
event = &rumor_event;
|
||||
} else {
|
||||
// Not for us.
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
||||
if seen_on.is_some() {
|
||||
|
Loading…
Reference in New Issue
Block a user