fix a crash

This commit is contained in:
DaInfLoop 2024-07-23 16:23:53 +01:00
parent 7e07781e98
commit e31bf9a6e8

View file

@ -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;