mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
Treat the rumor as having the giftwrap id so relationships/viewed/etc still work
This commit is contained in:
parent
5ddaa830ce
commit
2fe25503ff
@ -120,10 +120,11 @@ pub async fn process_new_event(
|
||||
|
||||
// If it is a GiftWrap, from here on out operate on the Rumor
|
||||
let mut event: &Event = event; // take ownership of this reference
|
||||
let rumor_event: Event;
|
||||
let mut rumor_event: Event;
|
||||
if event.kind == EventKind::GiftWrap {
|
||||
let rumor = GLOBALS.signer.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;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,9 @@ impl NoteData {
|
||||
secure = true;
|
||||
if let Ok(rumor) = GLOBALS.signer.unwrap_giftwrap(&event) {
|
||||
// Use the rumor for subsequent processing
|
||||
let id = event.id;
|
||||
event = rumor.into_event_with_bad_signature();
|
||||
event.id = id; // lie, keep the giftwrap id
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user