From af8322b73415faff4d228aee60e1e5eec3f6aaa6 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 25 Nov 2021 15:30:36 -0800 Subject: [PATCH] ContentHash should return offset not count --- peer/cwtchprofilestorage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/peer/cwtchprofilestorage.go b/peer/cwtchprofilestorage.go index 80f160c..b43620c 100644 --- a/peer/cwtchprofilestorage.go +++ b/peer/cwtchprofilestorage.go @@ -537,7 +537,8 @@ func (cps *CwtchProfileStorage) GetChannelMessageByContentHash(conversation int, } rows.Close() - return id, nil + // Return the offset **not** the count + return id-1, nil } // GetRowNumberByMessageID looks up the row number of a message by the message ID