enhancement(lint): Fix lint errors for src/commands/home.ts

Co-authored-by: NeonGamerBot-QK <saahilattud@gmail.com>
Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
This commit is contained in:
zeon-neon[bot] 2024-12-17 03:40:36 +00:00 committed by GitHub
parent c33faaa8a2
commit 8ebce8e809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,31 +88,31 @@ export default class AppHome implements Command {
{
type: "section",
elements: app.dbs.anondm
//@ts-ignore
.get(usersInDb.find((e) => bcrypt.compareSync(event.user, e)))
.messages.filter((e) => {
try {
EncryptedJsonDb.decrypt(
e,
//@ts-ignore
`${event.user}_` + process.env.ANONDM_PASSWORD,
);
return true;
} catch (e) {
return false;
}
})
.map((e) => {
// map to a slack element block
return {
type: "section",
text: {
type: "mrkdwn",
text: `> :email_unread: New Message`,
},
};
})
}
//@ts-ignore
.get(usersInDb.find((e) => bcrypt.compareSync(event.user, e)))
.messages.filter((e) => {
try {
EncryptedJsonDb.decrypt(
e,
//@ts-ignore
`${event.user}_` + process.env.ANONDM_PASSWORD,
);
return true;
} catch (e) {
return false;
}
})
.map((e) => {
// map to a slack element block
return {
type: "section",
text: {
type: "mrkdwn",
text: `> :email_unread: New Message`,
},
};
}),
},
];
//@ts-ignore
if (process.env.MY_USER_ID !== event.user)