Use original message id for edit message history.

This commit is contained in:
Clark
2023-05-22 11:51:00 -04:00
committed by Nicholas Tinsley
parent b540009ce6
commit c26f54161d
6 changed files with 15 additions and 14 deletions

View File

@@ -1942,7 +1942,7 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
fun getMessageEditHistory(id: Long): MmsReader {
val cursor = readableDatabase.select(*MMS_PROJECTION)
.from(TABLE_NAME)
.where("$TABLE_NAME.$ID = ? OR $TABLE_NAME.$LATEST_REVISION_ID = ?", id, id)
.where("$TABLE_NAME.$ID = ? OR $TABLE_NAME.$ORIGINAL_MESSAGE_ID = ?", id, id)
.orderBy("$TABLE_NAME.$DATE_SENT ASC")
.run()