From 82bb59d6f96610c61a4a025e50084cf594cc953f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20H=C3=BCttemann?= Date: Tue, 23 May 2023 15:28:36 +0200 Subject: [PATCH] Move User type to own module --- src/app.ts | 9 +-------- src/users.ts | 7 +++++++ 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 src/users.ts diff --git a/src/app.ts b/src/app.ts index 41bde06..16f1b27 100644 --- a/src/app.ts +++ b/src/app.ts @@ -3,6 +3,7 @@ import readline from 'node:readline' import log from './logger' import { whoami } from './synapse' import { storage } from './storage' +import { RcUser } from './users' log.info('rocketchat2matrix starts.') @@ -12,14 +13,6 @@ const enum Entities { Messages = 'rocketchat_message.json', } -type RcUser = { - username: string - name: string - roles: string[] - _id: string - __rooms: string[] -} - function loadRcExport(entity: Entities): Promise { const rl = readline.createInterface({ input: fs.createReadStream(`./inputs/${entity}`, { diff --git a/src/users.ts b/src/users.ts new file mode 100644 index 0000000..9da11f8 --- /dev/null +++ b/src/users.ts @@ -0,0 +1,7 @@ +export type RcUser = { + username: string + name: string + roles: string[] + _id: string + __rooms: string[] +}