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