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:51:20 +00:00 committed by GitHub
parent fdc0c1aebb
commit 9443bb761d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,43 +84,42 @@ export default class AppHome implements Command {
value: "send_mail",
action_id: "send_mail",
},
},
...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",
//@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`,
},
accessory: {
type: "button",
text: {
type: "mrkdwn",
text: `> :email_unread: New Message`,
type: "plain_text",
text: "Open",
emoji: true,
},
accessory: {
type: "button",
text: {
type: "plain_text",
text: "Open",
emoji: true,
},
value: "open_mail_v",
action_id: "open_mail_actionid",
}
};
}),
value: "open_mail_v",
action_id: "open_mail_actionid",
},
};
}),
];
//@ts-ignore
if (process.env.MY_USER_ID !== event.user)