From 24ca68af284968dd3edf1a4e6fabb149aa0e5d34 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 7 Aug 2024 23:14:15 +0300 Subject: [PATCH] legacymigrate: maybe fix migrating relay users [skip cd] --- cmd/mautrix-signal/legacymigrate.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mautrix-signal/legacymigrate.sql b/cmd/mautrix-signal/legacymigrate.sql index 258194fb..806fcc23 100644 --- a/cmd/mautrix-signal/legacymigrate.sql +++ b/cmd/mautrix-signal/legacymigrate.sql @@ -35,7 +35,7 @@ SELECT NULL, -- parent_id '', -- parent_receiver CASE WHEN portal_old.relay_user_id<>'' THEN '' END, -- relay_bridge_id - CASE WHEN portal_old.relay_user_id<>'' THEN portal_old.relay_user_id END, -- relay_login_id + CASE WHEN portal_old.relay_user_id<>'' THEN (SELECT id FROM user_login WHERE user_mxid=portal_old.relay_user_id) END, -- relay_login_id CASE WHEN LENGTH(chat_id)=44 THEN NULL ELSE chat_id END, -- other_user_id name, topic,