Ignore Synapse appservice users in syn2mas
These users don't need to be migrated as Synapse handles appservices itself.
This commit is contained in:
committed by
Quentin Gliech
parent
6cccb1c127
commit
ee33697a3c
@@ -200,7 +200,11 @@ export async function migrate(): Promise<void> {
|
||||
);
|
||||
}
|
||||
|
||||
const synapseUsers = await synapse.select("*").from<SUser>("users");
|
||||
// Get all Synapse users, except appservice owned users who don't need to be migrated
|
||||
const synapseUsers = await synapse
|
||||
.select("*")
|
||||
.from<SUser>("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);
|
||||
|
||||
1
tools/syn2mas/src/types/SUser.d.ts
vendored
1
tools/syn2mas/src/types/SUser.d.ts
vendored
@@ -21,4 +21,5 @@ export interface SUser {
|
||||
is_guest: number;
|
||||
deactivated: number;
|
||||
creation_ts: UnixTimestamp;
|
||||
appservice_id?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user