git » sdk » commit 8865635

Select stanza_id

author Stephen Paul Weber
2025-06-24 18:41:57 UTC
committer Stephen Paul Weber
2025-06-24 18:41:57 UTC
parent 0b975ab5e75899aebbfa15c05804d2b4fcb94fe0

Select stanza_id

snikket/persistence/Sqlite.hx +1 -1

diff --git a/snikket/persistence/Sqlite.hx b/snikket/persistence/Sqlite.hx
index f92be19..d69189a 100644
--- a/snikket/persistence/Sqlite.hx
+++ b/snikket/persistence/Sqlite.hx
@@ -515,7 +515,7 @@ class Sqlite implements Persistence implements KeyValueStore {
 			[status, accountId, localId, MessageSent, MessageDeliveredToDevice]
 		).then(_ ->
 			db.exec(
-				"SELECT stanza, direction, type, status, strftime('%FT%H:%M:%fZ', created_at / 1000.0, 'unixepoch') AS timestamp, sender_id, mam_id, mam_by, sync_point FROM messages WHERE account_id=? AND stanza_id=? AND direction=?",
+				"SELECT stanza, direction, type, status, strftime('%FT%H:%M:%fZ', created_at / 1000.0, 'unixepoch') AS timestamp, sender_id, correction_id AS stanza_id, mam_id, mam_by, sync_point FROM messages WHERE account_id=? AND stanza_id=? AND direction=?",
 				[accountId, localId, MessageSent]
 			)
 		).then(result -> hydrateMessages(accountId, result)).then(messages -> {