fix(migration): stop ownerId ping-pong on group DMs with 2 members
migrateFixOneOnOneOwnerIds was too aggressive — it set owner_id=NULL on any 2-member channel, including group DMs that happened to have 2 members. The group DM repair then restored owner_id, creating noisy logs every restart. Now only targets channels with NULL or 32-char hex federatedId (true 1-on-1 DMs), skipping UUID-format group DMs.
This commit is contained in:
@@ -1993,6 +1993,7 @@ function migrateFixOneOnOneOwnerIds(db: Database.Database): void {
|
||||
HAVING COUNT(*) = 2
|
||||
)
|
||||
AND owner_id IS NOT NULL
|
||||
AND (federated_id IS NULL OR length(federated_id) = 32)
|
||||
`).run();
|
||||
|
||||
if (result.changes > 0) {
|
||||
|
||||
Reference in New Issue
Block a user