Skip to content

Commit

Permalink
legacymigrate: ignore messages with null sender
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 13, 2024
1 parent 12073df commit a219b72
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/mautrix-whatsapp/legacymigrate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ SELECT
FROM user_portal_old;

ALTER TABLE message_old ADD COLUMN combined_id TEXT;
DELETE FROM message_old WHERE sender IS NULL;
UPDATE message_old SET combined_id = chat_jid || ':' || (
CASE WHEN sender LIKE '%:%@s.whatsapp.net'
THEN (split_part(replace(sender, '@s.whatsapp.net', ''), ':', 1) || '@s.whatsapp.net')
Expand Down

0 comments on commit a219b72

Please sign in to comment.