feat(chat): fixed typo in profile command and improved profile in chat

This commit is contained in:
Maieul BOYER 2026-01-04 16:36:34 +01:00 committed by Maix0
parent 3e1dd0fdd9
commit 69ba60b03d
6 changed files with 28 additions and 16 deletions

View file

@ -20,10 +20,10 @@ export async function makeProfil(fastify: FastifyInstance, user: string, socket:
const users: User[] = fastify.db.getAllUsers() ?? [];
const allUsers: User | null = getUserByName(users, user);
if (user === allUsers?.name) {
let loginState = `${allUsers?.login ?? 'Guest'}`;
if (loginState !== 'Guest') {
loginState = 'Member';
}
let loginState = 'Guest';
if (allUsers?.login) { loginState = 'Member'; }
if (allUsers.provider_unique) { loginState = 'External Member'; }
clientProfil =
{
command: 'makeProfil',