fix: ensure queries coalesce `album_id` value when scanning

Otherwise databases with existing messages that don't have an `album_id`
will run into and `converting NULL to string is unsupported` error.

See: https://github.com/status-im/status-go/pull/3021#issuecomment-1351623814
This commit is contained in:
Pascal Precht 2022-12-14 16:34:03 +01:00 committed by r4bbit
parent 4a0eb56574
commit b1ff13eb7d
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ func (db sqlitePersistence) tableUserMessagesAllFieldsJoin() string {
m1.sticker_hash,
m1.image_payload,
m1.image_type,
m1.album_id,
COALESCE(m1.album_id, ""),
COALESCE(m1.audio_duration_ms,0),
m1.community_id,
m1.mentions,