First Major Clean Up Done

This commit is contained in:
NigeParis 2026-01-02 15:11:34 +01:00 committed by Maix0
parent 949e5a259a
commit afd79e334c
29 changed files with 46 additions and 118 deletions

View file

@ -0,0 +1,23 @@
import { Socket } from 'socket.io-client';
/**
* getProfil of a user
* @param socket
* @param user
* @returns
*/
export function getProfil(socket: Socket, user: string) {
if (!socket.connected) return;
const profil = {
command: '@profil',
destination: 'profilMessage',
type: "chat",
user: user,
token: document.cookie ?? "",
text: user,
timestamp: Date.now(),
SenderWindowID: socket.id,
};
socket.emit('profilMessage', JSON.stringify(profil));
}