diff --git a/tools/syn2mas/src/migrate.mts b/tools/syn2mas/src/migrate.mts index f78b9c8e6..93208054f 100644 --- a/tools/syn2mas/src/migrate.mts +++ b/tools/syn2mas/src/migrate.mts @@ -200,7 +200,11 @@ export async function migrate(): Promise { ); } - const synapseUsers = await synapse.select("*").from("users"); + // Get all Synapse users, except appservice owned users who don't need to be migrated + const synapseUsers = await synapse + .select("*") + .from("users") + .whereNull("appservice_id"); log.info(`Found ${synapseUsers.length} users in Synapse`); for (const user of synapseUsers) { const localpart = user.name.split(":")[0].substring(1); diff --git a/tools/syn2mas/src/types/SUser.d.ts b/tools/syn2mas/src/types/SUser.d.ts index c597d449d..404d7e5d9 100644 --- a/tools/syn2mas/src/types/SUser.d.ts +++ b/tools/syn2mas/src/types/SUser.d.ts @@ -21,4 +21,5 @@ export interface SUser { is_guest: number; deactivated: number; creation_ts: UnixTimestamp; + appservice_id?: string; }