From dba1509ee2f15cd884323a333052fd1b69151dea Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Thu, 28 Dec 2023 17:00:04 -0500
Subject: [PATCH] conversation: set linearized parent for shared commit

Change-Id: I2f49e2dbcd6538f7a124398a9c84a68c7e5d256d
---
 src/jamidht/conversation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/jamidht/conversation.cpp b/src/jamidht/conversation.cpp
index abe48fb00e..7ced8ff1a8 100644
--- a/src/jamidht/conversation.cpp
+++ b/src/jamidht/conversation.cpp
@@ -996,7 +996,7 @@ Conversation::Impl::handleMessage(History& history, const std::shared_ptr<libjam
         // For a loaded message, we load from newest to oldest
         // So we change the parent of the last message.
         if (!history.messageList.empty())
-            (*history.messageList.rbegin())->linearizedParent = sharedCommit->id;
+            sharedCommit->linearizedParent = (*history.messageList.rbegin())->id;
         history.messageList.emplace_back(sharedCommit);
     }
     // Handle pending reactions/editions
-- 
GitLab