|
3 | 3 | // SPDX-License-Identifier: AGPL-3.0-only
|
4 | 4 | // Please see LICENSE in the repository root for full details.
|
5 | 5 |
|
| 6 | +#![expect( |
| 7 | + clippy::overly_complex_bool_expr, |
| 8 | + reason = "This is temporary, to remove a few safe guards" |
| 9 | +)] |
| 10 | + |
6 | 11 | //! # Migration
|
7 | 12 | //!
|
8 | 13 | //! This module provides the high-level logic for performing the Synapse-to-MAS
|
|
14 | 19 | use std::{
|
15 | 20 | collections::{HashMap, HashSet},
|
16 | 21 | pin::pin,
|
| 22 | + time::Instant, |
17 | 23 | };
|
18 | 24 |
|
19 | 25 | use chrono::{DateTime, Utc};
|
@@ -329,7 +335,8 @@ async fn migrate_threepids(
|
329 | 335 | .into_extract_localpart(synapse_user_id.clone())?
|
330 | 336 | .to_owned();
|
331 | 337 | let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
|
332 |
| - if is_likely_appservice(&username) { |
| 338 | + if true || is_likely_appservice(&username) { |
| 339 | + // HACK can we do anything better |
333 | 340 | continue;
|
334 | 341 | }
|
335 | 342 | return Err(Error::MissingUserFromDependentTable {
|
@@ -416,7 +423,8 @@ async fn migrate_external_ids(
|
416 | 423 | .into_extract_localpart(synapse_user_id.clone())?
|
417 | 424 | .to_owned();
|
418 | 425 | let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
|
419 |
| - if is_likely_appservice(&username) { |
| 426 | + if true || is_likely_appservice(&username) { |
| 427 | + // HACK can we do anything better |
420 | 428 | continue;
|
421 | 429 | }
|
422 | 430 | return Err(Error::MissingUserFromDependentTable {
|
@@ -505,7 +513,8 @@ async fn migrate_devices(
|
505 | 513 | .into_extract_localpart(synapse_user_id.clone())?
|
506 | 514 | .to_owned();
|
507 | 515 | let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
|
508 |
| - if is_likely_appservice(&username) { |
| 516 | + if true || is_likely_appservice(&username) { |
| 517 | + // HACK can we do anything better |
509 | 518 | continue;
|
510 | 519 | }
|
511 | 520 | return Err(Error::MissingUserFromDependentTable {
|
@@ -606,7 +615,8 @@ async fn migrate_unrefreshable_access_tokens(
|
606 | 615 | .into_extract_localpart(synapse_user_id.clone())?
|
607 | 616 | .to_owned();
|
608 | 617 | let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
|
609 |
| - if is_likely_appservice(&username) { |
| 618 | + if true || is_likely_appservice(&username) { |
| 619 | + // HACK can we do anything better |
610 | 620 | continue;
|
611 | 621 | }
|
612 | 622 | return Err(Error::MissingUserFromDependentTable {
|
@@ -725,7 +735,8 @@ async fn migrate_refreshable_token_pairs(
|
725 | 735 | .into_extract_localpart(synapse_user_id.clone())?
|
726 | 736 | .to_owned();
|
727 | 737 | let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
|
728 |
| - if is_likely_appservice(&username) { |
| 738 | + if true || is_likely_appservice(&username) { |
| 739 | + // HACK can we do anything better |
729 | 740 | continue;
|
730 | 741 | }
|
731 | 742 | return Err(Error::MissingUserFromDependentTable {
|
|
0 commit comments