feat(chat): fixed typo in profile command and improved profile in chat
This commit is contained in:
parent
3e1dd0fdd9
commit
69ba60b03d
6 changed files with 28 additions and 16 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue