fix a crash
This commit is contained in:
parent
7e07781e98
commit
e31bf9a6e8
1
index.ts
1
index.ts
|
@ -259,6 +259,7 @@ app.action('check-synced', async (ctx) => {
|
||||||
|
|
||||||
for (let fren of frens) {
|
for (let fren of frens) {
|
||||||
const dbFren = links.find(frend => frend.nsaid == fren.nsaId)!;
|
const dbFren = links.find(frend => frend.nsaid == fren.nsaId)!;
|
||||||
|
if (!dbFren) continue;
|
||||||
const slackUser = (await app.client.users.info({ user: dbFren.slackid })).user!;
|
const slackUser = (await app.client.users.info({ user: dbFren.slackid })).user!;
|
||||||
|
|
||||||
if (slackUser.is_admin || slackUser.is_owner) return;
|
if (slackUser.is_admin || slackUser.is_owner) return;
|
||||||
|
|
Loading…
Reference in a new issue