From 918a3d99aa84727b0bf84d83cc6b0125b3c301cd Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 8 Aug 2024 14:50:26 +0100 Subject: fix(remote): `push` proposal use correct thread in the event of a proposal revisions --- src/git_remote_helper.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/git_remote_helper.rs b/src/git_remote_helper.rs index f679f20..f36b23b 100644 --- a/src/git_remote_helper.rs +++ b/src/git_remote_helper.rs @@ -671,10 +671,11 @@ async fn push( .concat() .contains(&user_ref.public_key) { - let thread_id = if patches.len().eq(&1) { - tip_patch.id() + let thread_id = if let Ok(root_event_id) = get_event_root(tip_patch) { + root_event_id } else { - get_event_root(tip_patch)? + // tip patch is the root proposal + tip_patch.id() }; let mut parent_patch = tip_patch.clone(); ahead.reverse(); -- cgit v1.2.3